Index: xotcl/ChangeLog =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/ChangeLog (.../ChangeLog) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/ChangeLog (.../ChangeLog) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,96 +1,7 @@ -2007-08-06: - * Changed all references to /tmp to [::xotcl::tmpdir] to honor - TMPDIR TEMP TMP if set - - * Handling of variable traces in serializer: - traces might require a different topological sort, - which is hard to handle. Similar as with filters, - we deactivate the variable traces during initialization. - This happens by - (1) replacing the XOTcl's trace method by a no-op - (2) collecting variable traces through collect-var-traces - (3) re-activating the traces after variable initialization - - (Many thanks to Stefan Sobernig for the help!) - -2007-08-05: - * Changes to compile xotcl with the new Var structures in the - head version of Tcl 8.5. This is a rather large change, - the patch is more than 800 lines. - - (Many thanks to Miguel Sofer for the help!) - - From the Tcl Changelog - - *** POTENTIAL INCOMPATIBILITY *** (tclInt.h and tclCompile.h) - Extensions that access internals defined in tclInt.h and/or - tclCompile.h may lose both binary and source compatibility. The - relevant changes are: - - 1. 'struct Var' is completely changed, all acceses to its - internals (either direct or via the TclSetVar* and TclIsVar* - macros) will malfunction. Var flag values and semantics - changed too. - - 2. 'struct Bytecode' has an additional field that has to be - initialised to NULL - - 3. 'struct Namespace' is larger, as the varTable is now one - pointer larger than a Tcl_HashTable. Direct access to its - fields will malfunction. - - 4. 'struct CallFrame' grew one more field (the second such - growth with respect to Tcl8.4). - - 5. api change for the functions TclFindCompiledLocal, - TclDeleteVars and many internal functions in tclVar.c - -2007-07-27: - * fixed a compile problem with a superfluous semicolon in a macro - (Many thanks for Andreas Kupries for reporting and sending a patch) - * fixed two compiler warnings in gcc 4.1.2 - -2007-07-23 - * Pre-Release of XOTcl 1.5.4 - -2007-07-23: - * fixed a bug with empty argument names - (Many thanks for Stefan Sobernig for reporting the bug) - -2007-07-03: - * allow to call methods from the class to be called - from slot objects (Many thanks for - Nico L'INSALATA for noting this problem). - 2007-06-05: * Fixed spelling mistakes in the tutorial (Many thanks to Robert Hicks for reporting) -2007-05-27: - * Fixed potential error with default values for parameters - starting with a "-". (Many thanks to Shishir Ramam - for reporting) - -2007-03-16: - * fixed a bug where a Tcl call adds a namespace to an object, - but xotcl did not notice it. (Many thanks for Stefan Sobernig - for reporting the bug) - -2007-01-14: - * fixing error message propagation for methods called via - configure. (Many thanks for Kristoffer Lawson - for reporting the bug) - -2006-12-12 - * changing "test == " to "test =" as required by FreeBSD - (many thanks to Martin Matuska for providing - the patch) - -2006-12-07 - * MinGW patches - (many thanks to Martin Matuska for providing - the patch) - 2006-11-25 * Release of XOTcl 1.5.3 Index: xotcl/Makefile =================================================================== diff -u -r7eebad4e9179bac6fac6af582851da851ff8def6 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/Makefile (.../Makefile) (revision 7eebad4e9179bac6fac6af582851da851ff8def6) +++ xotcl/Makefile (.../Makefile) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -12,22 +12,22 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: Makefile,v 1.43 2007/08/08 01:19:06 neumann Exp $ +# RCS: @(#) $Id: Makefile,v 1.44 2007/08/14 16:36:46 neumann Exp $ #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that # have been added in a customized configure script. #======================================================================== -#XOTCL_VERSION = 1.5.4 +#XOTCL_VERSION = 1.5.3 XOTCL_VERSION = 1.5 src_lib_dir = ${srcdir}/library src_doc_dir = ${srcdir}/doc src_test_dir = ${srcdir}/tests src_app_dir = ${srcdir}/apps src_generic_dir = ${srcdir}/generic -TCL_LIB_SPEC = -L/usr/local/lib -ltcl8.5 +TCL_LIB_SPEC = -L/usr/local/lib -ltcl8.4 TK_LIB_SPEC = subdirs = aol_prefix = /usr/local/aolserver @@ -98,8 +98,8 @@ # configuration options) composed of the named objects. #======================================================================== -PKG_LIB_FILE = libxotcl1.5.4.dylib -PKG_STUB_LIB_FILE = libxotclstub1.5.4.a +PKG_LIB_FILE = libxotcl1.5.3.dylib +PKG_STUB_LIB_FILE = libxotclstub1.5.3.a lib_BINARIES = $(PKG_LIB_FILE) $(PKG_STUB_LIB_FILE) BINARIES = $(lib_BINARIES) @@ -126,7 +126,7 @@ INSTALL_SCRIPT = ${INSTALL} PACKAGE_NAME = xotcl -PACKAGE_VERSION = 1.5.4 +PACKAGE_VERSION = 1.5.3 CC = gcc -pipe CFLAGS_DEFAULT = -Os CFLAGS_WARNING = -Wall -Wno-implicit-int @@ -143,19 +143,19 @@ SHLIB_CFLAGS = -fno-common SHLIB_LD = ${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT} -Wl,-single_module SHLIB_LD_FLAGS = @SHLIB_LD_FLAGS@ -SHLIB_LD_LIBS = ${LIBS} -L/usr/local/lib -ltclstub8.5 +SHLIB_LD_LIBS = ${LIBS} -L/usr/local/lib -ltclstub8.4 STLIB_LD = ${AR} cr -TCL_DEFS = -DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" -DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tcl\ 8.5\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_GET_STACKSIZE_NP=1 -DTCL_THREADS=1 -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DHAVE_COREFOUNDATION=1 -DMAC_OSX_TCL=1 -DTCL_SHLIB_EXT=\".dylib\" -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 -DTCL_TOMMATH=1 -DMP_PREC=4 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOLL=1 -DHAVE_STRTOULL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_GETPWUID_R_5=1 -DHAVE_GETPWUID_R=1 -DHAVE_GETPWNAM_R_5=1 -DHAVE_GETPWNAM_R=1 -DHAVE_GETGRGID_R_5=1 -DHAVE_GETGRGID_R=1 -DHAVE_GETGRNAM_R_5=1 -DHAVE_GETGRNAM_R=1 -DHAVE_MTSAFE_GETHOSTBYNAME=1 -DHAVE_MTSAFE_GETHOSTBYADDR=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STRUCT_TM_TM_ZONE=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_MKTIME=1 -DHAVE_TM_GMTOFF=1 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_PUTENV_THAT_COPIES=1 -DHAVE_LANGINFO=1 -DHAVE_CHFLAGS=1 -DHAVE_GETATTRLIST=1 -DHAVE_COPYFILE=1 -DHAVE_LIBKERN_OSATOMIC_H=1 -DHAVE_OSSPINLOCKLOCK=1 -DHAVE_PTHREAD_ATFORK=1 -DUSE_VFORK=1 -DTCL_DEFAULT_ENCODING=\"utf-8\" -DTCL_LOAD_FROM_MEMORY=1 -DTCL_WIDE_CLICKS=1 -DHAVE_AVAILABILITYMACROS_H=1 -DHAVE_FTS=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1 -DTCL_UNLOAD_DLLS=1 +TCL_DEFS = -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1 -DTCL_THREADS=1 -DHAVE_COREFOUNDATION=1 -DMAC_OSX_TCL=1 -DTCL_WIDE_INT_TYPE=long\ long -DWORDS_BIGENDIAN=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOLL=1 -DHAVE_STRTOULL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_GETPWUID_R_5=1 -DHAVE_GETPWUID_R=1 -DHAVE_GETPWNAM_R_5=1 -DHAVE_GETPWNAM_R=1 -DHAVE_GETGRGID_R_5=1 -DHAVE_GETGRGID_R=1 -DHAVE_GETGRNAM_R_5=1 -DHAVE_GETGRNAM_R=1 -DHAVE_MTSAFE_GETHOSTBYNAME=1 -DHAVE_MTSAFE_GETHOSTBYADDR=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TM_GMTOFF=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_PUTENV_THAT_COPIES=1 -DHAVE_LANGINFO=1 -DHAVE_COPYFILE=1 -DHAVE_LIBKERN_OSATOMIC_H=1 -DHAVE_OSSPINLOCKLOCK=1 -DHAVE_PTHREAD_ATFORK=1 -DUSE_VFORK=1 -DTCL_DEFAULT_ENCODING=\"utf-8\" -DTCL_LOAD_FROM_MEMORY=1 -DHAVE_AVAILABILITYMACROS_H=1 -DHAVE_FTS=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1 TCL_BIN_DIR = /usr/local/lib -TCL_SRC_DIR = /Users/neumann/src/tcl/tcl +TCL_SRC_DIR = /usr/local/src/tcl8.4.14 # This is necessary for packages that use private Tcl headers -#TCL_TOP_DIR_NATIVE = "/Users/neumann/src/tcl/tcl" +#TCL_TOP_DIR_NATIVE = "/usr/local/src/tcl8.4.14" # Not used, but retained for reference of what libs Tcl required TCL_LIBS = ${DL_LIBS} ${LIBS} ${MATH_LIBS} -pkgdatadir = /usr/local/share/xotcl1.5.4 -pkglibdir = /usr/local/lib/xotcl1.5.4 -pkgincludedir = /usr/local/include/xotcl1.5.4 +pkgdatadir = /usr/local/share/xotcl1.5.3 +pkglibdir = /usr/local/lib/xotcl1.5.3 +pkgincludedir = /usr/local/include/xotcl1.5.3 # XOTCLSH = xotclsh @@ -171,20 +171,20 @@ DYLD_LIBRARY_PATH="$(EXTRA_PATH):$(DYLD_LIBRARY_PATH)" \ PATH="$(EXTRA_PATH):$(PATH)" \ TCLLIBPATH="$(top_builddir) ${srcdir}" -TCLSH_PROG = /usr/local/bin/tclsh8.5 +TCLSH_PROG = /usr/local/bin/tclsh8.4 TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) SHARED_BUILD = 1 -INCLUDES = -I"/Users/neumann/src/tcl/tcl/generic" -I"/Users/neumann/src/tcl/tcl/unix" -I./generic -EXTRA_CFLAGS = -DXOTCLVERSION=\"1.5\" -DXOTCLPATCHLEVEL=\".4\" -DHAVE_TCL_COMPILE_H=1 +INCLUDES = -I"/usr/local/src/tcl8.4.14/generic" -I"/usr/local/src/tcl8.4.14/unix" -I./generic +EXTRA_CFLAGS = -DXOTCLVERSION=\"1.5\" -DXOTCLPATCHLEVEL=\".3\" -DHAVE_TCL_COMPILE_H=1 # TCL_DEFS is not strictly need here, but if you remove it, then you # must make sure that configure.in checks for the necessary components # that your library may use. TCL_DEFS can actually be a problem if # you do not compile with a similar machine setup as the Tcl core was # compiled with. -#DEFS = $(TCL_DEFS) -DPACKAGE_NAME=\"xotcl\" -DPACKAGE_TARNAME=\"xotcl\" -DPACKAGE_VERSION=\"1.5.4\" -DPACKAGE_STRING=\"xotcl\ 1.5.4\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DTCL_WIDE_INT_TYPE=long\ long -DUSE_TCL_STUBS=1 -DCOMPILE_XOTCL_STUBS=1 $(EXTRA_CFLAGS) -DEFS = -DPACKAGE_NAME=\"xotcl\" -DPACKAGE_TARNAME=\"xotcl\" -DPACKAGE_VERSION=\"1.5.4\" -DPACKAGE_STRING=\"xotcl\ 1.5.4\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DTCL_WIDE_INT_TYPE=long\ long -DUSE_TCL_STUBS=1 -DCOMPILE_XOTCL_STUBS=1 $(EXTRA_CFLAGS) +#DEFS = $(TCL_DEFS) -DPACKAGE_NAME=\"xotcl\" -DPACKAGE_TARNAME=\"xotcl\" -DPACKAGE_VERSION=\"1.5.3\" -DPACKAGE_STRING=\"xotcl\ 1.5.3\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DTCL_WIDE_INT_TYPE=long\ long -DUSE_TCL_STUBS=1 -DCOMPILE_XOTCL_STUBS=1 $(EXTRA_CFLAGS) +DEFS = -DPACKAGE_NAME=\"xotcl\" -DPACKAGE_TARNAME=\"xotcl\" -DPACKAGE_VERSION=\"1.5.3\" -DPACKAGE_STRING=\"xotcl\ 1.5.3\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DTCL_WIDE_INT_TYPE=long\ long -DUSE_TCL_STUBS=1 -DCOMPILE_XOTCL_STUBS=1 $(EXTRA_CFLAGS) CONFIG_CLEAN_FILES = Makefile xotclConfig.sh apps/utils/xotclsh apps/utils/xowish unix/xotcl.spec unix/pkgIndex.unix autom4te.cache/ @@ -292,15 +292,7 @@ mkdir -p $(DESTDIR)$(pkglibdir)/apps/$$i; \ chmod 755 $(DESTDIR)$(pkglibdir)/apps/$$i; \ for j in $(src_app_dir)/$$i/* ; do \ - if test -d $$j; then \ - mkdir -p $(DESTDIR)$(pkglibdir)/$$j; \ - chmod 755 $(DESTDIR)$(pkglibdir)/$$j; \ - for k in $$j/* ; do \ - $(INSTALL) $$k $(DESTDIR)$(pkglibdir)/$$j ; \ - done; \ - else \ $(INSTALL) $$j $(DESTDIR)$(pkglibdir)/apps/$$i/; \ - fi; \ done; \ done; @for i in $(appsrc) ; do \ @@ -634,7 +626,7 @@ @echo " setenv TCLLIBPATH \"$(TCLLIBPATH)\"" @echo " and" @if test "x$(XOTCLSH)" = "x" ; then \ - echo " /usr/local/bin/tclsh8.5" ; \ + echo " /usr/local/bin/tclsh8.4" ; \ echo " package require XOTcl; namespace import -force xotcl::*" ; \ echo " or" ; \ echo " put the 'package require' line into your ~/.tclshrc" ; \ Index: xotcl/Makefile.in =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/Makefile.in (.../Makefile.in) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/Makefile.in (.../Makefile.in) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: Makefile.in,v 1.22 2007/08/06 11:35:56 neumann Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.23 2007/08/14 16:36:46 neumann Exp $ #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that @@ -292,15 +292,7 @@ mkdir -p $(DESTDIR)$(pkglibdir)/apps/$$i; \ chmod 755 $(DESTDIR)$(pkglibdir)/apps/$$i; \ for j in $(src_app_dir)/$$i/* ; do \ - if test -d $$j; then \ - mkdir -p $(DESTDIR)$(pkglibdir)/$$j; \ - chmod 755 $(DESTDIR)$(pkglibdir)/$$j; \ - for k in $$j/* ; do \ - $(INSTALL) $$k $(DESTDIR)$(pkglibdir)/$$j ; \ - done; \ - else \ $(INSTALL) $$j $(DESTDIR)$(pkglibdir)/apps/$$i/; \ - fi; \ done; \ done; @for i in $(appsrc) ; do \ Index: xotcl/apps/comm/get-regression-nb.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/apps/comm/get-regression-nb.xotcl (.../get-regression-nb.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/apps/comm/get-regression-nb.xotcl (.../get-regression-nb.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -78,7 +78,7 @@ # # -set CACHE_DIR [::xotcl::tmpdir] +set CACHE_DIR /tmp package require xotcl::comm::httpAccess package require xotcl::trace Index: xotcl/apps/comm/webserver.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/apps/comm/webserver.xotcl (.../webserver.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/apps/comm/webserver.xotcl (.../webserver.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,16 +1,15 @@ #!../../src/xotclsh -# $Id: webserver.xotcl,v 1.7 2007/08/06 11:35:56 neumann Exp $ +# $Id: webserver.xotcl,v 1.8 2007/08/14 16:36:46 neumann Exp $ array set opts {-root ../../doc -port 8086 -protected-port 9096 -pkgdir .} array set opts $argv lappend auto_path $opts(-pkgdir) #if {$::tcl_platform(platform) eq "windows"} {lappend auto_path .} package require XOTcl; namespace import -force xotcl::* proc ! string { - set f [open [::xotcl::tmpdir]/log w+]; + set f [open /tmp/log w+]; puts $f "[clock format [clock seconds]] $string" - close $f -} + close $f} @ @File { description { Index: xotcl/apps/scripts/soccerClub.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/apps/scripts/soccerClub.xotcl (.../soccerClub.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/apps/scripts/soccerClub.xotcl (.../soccerClub.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,4 +1,4 @@ -# $Id: soccerClub.xotcl,v 1.5 2007/08/06 11:35:56 neumann Exp $ +# $Id: soccerClub.xotcl,v 1.6 2007/08/14 16:36:46 neumann Exp $ # This is a simple introductory example for the language XOTcl. # It demonstrates the basic language constructs on the example of # a soccer club. Index: xotcl/apps/utils/xotclsh =================================================================== diff -u -r7eebad4e9179bac6fac6af582851da851ff8def6 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/apps/utils/xotclsh (.../xotclsh) (revision 7eebad4e9179bac6fac6af582851da851ff8def6) +++ xotcl/apps/utils/xotclsh (.../xotclsh) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,7 +1,7 @@ -#!/usr/local/bin/tclsh8.5 +#!/usr/local/bin/tclsh8.4 if {$argc == 0} { puts "Don't use [info script] as interactive shell! Use instead:" - puts " /usr/local/bin/tclsh8.5" + puts " /usr/local/bin/tclsh8.4" puts " package require XOTcl; namespace import ::xotcl::*" } else { package require XOTcl Index: xotcl/apps/utils/xowish =================================================================== diff -u -r7eebad4e9179bac6fac6af582851da851ff8def6 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/apps/utils/xowish (.../xowish) (revision 7eebad4e9179bac6fac6af582851da851ff8def6) +++ xotcl/apps/utils/xowish (.../xowish) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,5 +1,5 @@ #!@WISH_PROG@ -###!/usr/local/bin/tclsh8.5 +###!/usr/local/bin/tclsh8.4 ###package require Tk if {$argc == 0} { puts "Don't use [info script] as interactive shell! Use instead:" Index: xotcl/configure =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/configure (.../configure) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/configure (.../configure) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for xotcl 1.5.4. +# Generated by GNU Autoconf 2.59 for xotcl 1.5.3. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation @@ -267,8 +267,8 @@ # Identity of this package. PACKAGE_NAME='xotcl' PACKAGE_TARNAME='xotcl' -PACKAGE_VERSION='1.5.4' -PACKAGE_STRING='xotcl 1.5.4' +PACKAGE_VERSION='1.5.3' +PACKAGE_STRING='xotcl 1.5.3' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. @@ -777,7 +777,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xotcl 1.5.4 to adapt to many kinds of systems. +\`configure' configures xotcl 1.5.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -834,7 +834,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xotcl 1.5.4:";; + short | recursive ) echo "Configuration of xotcl 1.5.3:";; esac cat <<\_ACEOF @@ -979,7 +979,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -xotcl configure 1.5.4 +xotcl configure 1.5.3 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -993,7 +993,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xotcl $as_me 1.5.4, which was +It was created by xotcl $as_me 1.5.3, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1572,7 +1572,7 @@ # do not modify the following lines manually, they are generated with changeXOTclVersion XOTCL_MAJOR_VERSION=1 XOTCL_MINOR_VERSION=5 -XOTCL_RELEASE_LEVEL=.4 +XOTCL_RELEASE_LEVEL=.3 XOTCL_VERSION=${XOTCL_MAJOR_VERSION}.${XOTCL_MINOR_VERSION} NODOT_VERSION=${XOTCL_MAJOR_VERSION}${XOTCL_MINOR_VERSION} @@ -10107,8 +10107,6 @@ # XOTcl specific configs # -if test "${TEA_PLATFORM}" != "windows" ; then - XOTCL_BUILD_LIB_SPEC="-L`pwd` -lxotcl${PACKAGE_VERSION}" XOTCL_LIB_SPEC="-L${pkglibdir} -lxotcl${PACKAGE_VERSION}" @@ -10129,25 +10127,14 @@ fi -else -XOTCL_BUILD_LIB_SPEC="`pwd`/${PKG_LIB_FILE}" -XOTCL_LIB_SPEC="${pkglibdir}/${PKG_LIB_FILE}" -XOTCL_BUILD_STUB_LIB_PATH="`pwd`/${PKG_STUB_LIB_FILE}" -XOTCL_STUB_LIB_PATH="${pkglibdir}/${PKG_STUB_LIB_FILE}" -XOTCL_BUILD_STUB_LIB_SPEC="`pwd`/${PKG_STUB_LIB_FILE}" -XOTCL_STUB_LIB_SPEC="${pkglibdir}/${PKG_STUB_LIB_FILE}" -fi - - - XOTCL_SRC_DIR=$srcdir @@ -10583,7 +10570,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by xotcl $as_me 1.5.4, which was +This file was extended by xotcl $as_me 1.5.3, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -10638,7 +10625,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -xotcl config.status 1.5.4 +xotcl config.status 1.5.3 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -11219,7 +11206,7 @@ for subdir in ${subdirs} do echo "==================== configure $subdir =====================" - if test x"${srcdir}" = x. ; then + if test x"${srcdir}" == x. ; then confdir=. else mkdir -p $subdir @@ -11254,5 +11241,3 @@ - - Index: xotcl/configure.in =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/configure.in (.../configure.in) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/configure.in (.../configure.in) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -11,7 +11,7 @@ # for this package, and can be a relative path, such as: # #-------------------------------------------------------------------- -define(XOTclVersion, 1.5.4) +define(XOTclVersion, 1.5.3) AC_INIT([xotcl], [XOTclVersion]) #-------------------------------------------------------------------- @@ -104,7 +104,7 @@ # do not modify the following lines manually, they are generated with changeXOTclVersion XOTCL_MAJOR_VERSION=1 XOTCL_MINOR_VERSION=5 -XOTCL_RELEASE_LEVEL=.4 +XOTCL_RELEASE_LEVEL=.3 XOTCL_VERSION=${XOTCL_MAJOR_VERSION}.${XOTCL_MINOR_VERSION} NODOT_VERSION=${XOTCL_MAJOR_VERSION}${XOTCL_MINOR_VERSION} @@ -361,8 +361,6 @@ # XOTcl specific configs # -if test "${TEA_PLATFORM}" != "windows" ; then - XOTCL_BUILD_LIB_SPEC="-L`pwd` -lxotcl${PACKAGE_VERSION}" XOTCL_LIB_SPEC="-L${pkglibdir} -lxotcl${PACKAGE_VERSION}" @@ -380,17 +378,6 @@ AC_DEFINE(COMPILE_XOTCL_STUBS) fi -else - -XOTCL_BUILD_LIB_SPEC="`pwd`/${PKG_LIB_FILE}" -XOTCL_LIB_SPEC="${pkglibdir}/${PKG_LIB_FILE}" -XOTCL_BUILD_STUB_LIB_PATH="`pwd`/${PKG_STUB_LIB_FILE}" -XOTCL_STUB_LIB_PATH="${pkglibdir}/${PKG_STUB_LIB_FILE}" -XOTCL_BUILD_STUB_LIB_SPEC="`pwd`/${PKG_STUB_LIB_FILE}" -XOTCL_STUB_LIB_SPEC="${pkglibdir}/${PKG_STUB_LIB_FILE}" - -fi - AC_SUBST(SHARED_LIB_SUFFIX) AC_SUBST(UNSHARED_LIB_SUFFIX) AC_SUBST(XOTCL_BUILD_LIB_SPEC) @@ -452,7 +439,7 @@ for subdir in ${subdirs} do echo "==================== configure $subdir =====================" - if test x"${srcdir}" = x. ; then + if test x"${srcdir}" == x. ; then confdir=. else mkdir -p $subdir @@ -487,5 +474,3 @@ - - Index: xotcl/doc/langRef.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/doc/langRef.xotcl (.../langRef.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/doc/langRef.xotcl (.../langRef.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,4 +1,4 @@ -# $Id: langRef.xotcl,v 1.15 2007/08/06 11:35:56 neumann Exp $ +# $Id: langRef.xotcl,v 1.16 2007/08/14 16:36:46 neumann Exp $ package provide XOTcl-langRef 1.5.2 package require XOTcl @@ -124,7 +124,7 @@ } - date { $Date: 2007/08/06 11:35:56 $ } + date { $Date: 2007/08/14 16:36:46 $ } } ## Index: xotcl/doc/tutorial.html =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/doc/tutorial.html (.../tutorial.html) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/doc/tutorial.html (.../tutorial.html) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,5 +1,5 @@ - + XOTcl - Tutorial Index: xotcl/doc/xo-daemon.html =================================================================== diff -u -r7eebad4e9179bac6fac6af582851da851ff8def6 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/doc/xo-daemon.html (.../xo-daemon.html) (revision 7eebad4e9179bac6fac6af582851da851ff8def6) +++ xotcl/doc/xo-daemon.html (.../xo-daemon.html) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -76,7 +76,7 @@ Date: - [::xotcl::rcs date {$Date: 2007/08/08 01:19:06 $}] + [::xotcl::rcs date {$Date: 2007/08/14 16:36:47 $}] Index: xotcl/doc/xo-whichPkg.html =================================================================== diff -u -r7eebad4e9179bac6fac6af582851da851ff8def6 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/doc/xo-whichPkg.html (.../xo-whichPkg.html) (revision 7eebad4e9179bac6fac6af582851da851ff8def6) +++ xotcl/doc/xo-whichPkg.html (.../xo-whichPkg.html) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -50,7 +50,7 @@ Date: - [::xotcl::rcs date {$Date: 2007/08/08 01:19:06 $}] + [::xotcl::rcs date {$Date: 2007/08/14 16:36:47 $}] Index: xotcl/generic/aol-xotcl.tcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/generic/aol-xotcl.tcl (.../aol-xotcl.tcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/generic/aol-xotcl.tcl (.../aol-xotcl.tcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,4 +1,4 @@ -# $Id: aol-xotcl.tcl,v 1.13 2007/08/06 11:35:56 neumann Exp $ +# $Id: aol-xotcl.tcl,v 1.14 2007/08/14 16:36:47 neumann Exp $ # # Load XOTcl library and some related packages. @@ -47,9 +47,18 @@ $objects \n $import] # just for debugging purposes if {0} { - set f [open [::xotcl::tmpdir]/__aolserver-blueprint.tcl w] - puts $f $script - close $f + set tmp /tmp + foreach e [list TMPDIR TEMP TMP] { + if {[info exists ::env($e)] \ + && [file isdirectory $::env($e)] \ + && [file iswritable $::env($e)]} { + set tmp $::env($e) + break + } + } + set f [open ${tmp}/__aolserver-blueprint.tcl w] + puts $f $script + close $f } } Index: xotcl/generic/predefined.h =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/generic/predefined.h (.../predefined.h) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/generic/predefined.h (.../predefined.h) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,5 +1,5 @@ static char cmd[] = -"# $Id: predefined.h,v 1.14 2007/08/06 11:35:56 neumann Exp $\n" +"# $Id: predefined.h,v 1.15 2007/08/14 16:36:47 neumann Exp $\n" "foreach cmd [info command ::xotcl::Object::instcmd::*] {\n" "::xotcl::alias ::xotcl::Object [namespace tail $cmd] $cmd}\n" "foreach cmd {array append eval incr lappend trace subst unset} {\n" @@ -126,9 +126,9 @@ "value_check once}\n" "::xotcl::Attribute instproc __default_from_cmd {obj cmd var sub op} {\n" "$obj trace remove variable $var $op [list [self] [self proc] $obj $cmd]\n" -"$obj set $var [$obj eval $cmd]}\n" +"$obj set $var [eval $cmd]}\n" "::xotcl::Attribute instproc __value_from_cmd {obj cmd var sub op} {\n" -"$obj set $var [$obj eval $cmd]}\n" +"$obj set $var [eval $cmd]}\n" "::xotcl::Attribute instproc __value_changed_cmd {obj cmd var sub op} {\n" "eval $cmd}\n" "::xotcl::Attribute instproc destroy {} {\n" @@ -525,16 +525,5 @@ "if {${per-object}} {\n" "my proc $name $arguments $body} else {\n" "my instproc $name $arguments $body}}\n" -"proc ::xotcl::tmpdir {} {\n" -"foreach e [list TMPDIR TEMP TMP] {\n" -"if {[info exists ::env($e)] \\\n" -"&& [file isdirectory $::env($e)] \\\n" -"&& [file iswritable $::env($e)]} {\n" -"return $::env($e)}}\n" -"if {$::tcl_platform(platform) eq \"windows\"} {\n" -"foreach d [list \"C:\\\\TEMP\" \"C:\\\\TMP\" \"\\\\TEMP\" \"\\\\TMP\"] {\n" -"if {[file isdirectory $d] && [file iswritable $d]} {\n" -"return $d}}}\n" -"return /tmp}\n" ""; Index: xotcl/generic/predefined.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/generic/predefined.xotcl (.../predefined.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/generic/predefined.xotcl (.../predefined.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,4 +1,4 @@ -# $Id: predefined.xotcl,v 1.13 2007/08/06 11:35:56 neumann Exp $ +# $Id: predefined.xotcl,v 1.14 2007/08/14 16:36:47 neumann Exp $ # provide the standard command set for ::xotcl::Object foreach cmd [info command ::xotcl::Object::instcmd::*] { ::xotcl::alias ::xotcl::Object [namespace tail $cmd] $cmd @@ -203,11 +203,11 @@ ::xotcl::Attribute instproc __default_from_cmd {obj cmd var sub op} { #puts "GETVAR [self proc] obj=$obj cmd=$cmd, var=$var, op=$op" $obj trace remove variable $var $op [list [self] [self proc] $obj $cmd] - $obj set $var [$obj eval $cmd] + $obj set $var [eval $cmd] } ::xotcl::Attribute instproc __value_from_cmd {obj cmd var sub op} { #puts "GETVAR [self proc] obj=$obj cmd=$cmd, var=$var, op=$op" - $obj set $var [$obj eval $cmd] + $obj set $var [eval $cmd] } ::xotcl::Attribute instproc __value_changed_cmd {obj cmd var sub op} { #puts stderr "**************************" @@ -858,22 +858,3 @@ my instproc $name $arguments $body } } - -# setup a temp directory -proc ::xotcl::tmpdir {} { - foreach e [list TMPDIR TEMP TMP] { - if {[info exists ::env($e)] \ - && [file isdirectory $::env($e)] \ - && [file iswritable $::env($e)]} { - return $::env($e) - } - } - if {$::tcl_platform(platform) eq "windows"} { - foreach d [list "C:\\TEMP" "C:\\TMP" "\\TEMP" "\\TMP"] { - if {[file isdirectory $d] && [file iswritable $d]} { - return $d - } - } - } - return /tmp -} Index: xotcl/generic/xotcl.c =================================================================== diff -u -r7eebad4e9179bac6fac6af582851da851ff8def6 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/generic/xotcl.c (.../xotcl.c) (revision 7eebad4e9179bac6fac6af582851da851ff8def6) +++ xotcl/generic/xotcl.c (.../xotcl.c) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,4 +1,4 @@ -/* $Id: xotcl.c,v 1.45 2007/08/08 01:19:06 neumann Exp $ +/* $Id: xotcl.c,v 1.46 2007/08/14 16:36:47 neumann Exp $ * * XOTcl - Extended OTcl * @@ -58,7 +58,6 @@ int xotclMemCountInterpCounter = 0; #endif - /* * Tcl_Obj Types for XOTcl Objects */ @@ -151,7 +150,6 @@ static int callDestroyMethod(ClientData cd, Tcl_Interp *in, XOTclObject *obj, int flags); -static int XOTclObjConvertObject(Tcl_Interp *in, register Tcl_Obj *objPtr, XOTclObject **obj); static XOTclObject *XOTclpGetObject(Tcl_Interp *in, char *name); static XOTclClass *XOTclpGetClass(Tcl_Interp *in, char *name); static XOTclCallStackContent* CallStackGetFrame(Tcl_Interp *in); @@ -182,7 +180,7 @@ return result; } static int -Tcl_EvalEx(Tcl_Interp *in, char *cmd, int len, int flags) { +Tcl_EvalEx(Tcl_Interp *in, char *cmd, int len, int flats) { return Tcl_Eval(in, cmd); } static int @@ -198,146 +196,7 @@ #endif -#if defined(PRE85) -/* - * for backward compatibility - */ -#define VarHashGetValue(hPtr) \ - (Var *) Tcl_GetHashValue(hPtr) -#define TclIsVarTraced(varPtr) \ - (varPtr->tracePtr != NULL) -#define VarHashTable(t) t -#define TclVarHashTable Tcl_HashTable -#define TclInitVarHashTable(tablePtr, nsPtr) \ - Tcl_InitHashTable((tablePtr), TCL_STRING_KEYS) -#define VarHashRefCount(varPtr) (varPtr)->refCount - /* - * We need NewVar from tclVar.c ... but its not exported - */ -static Var *NewVar() { - register Var *varPtr; - - varPtr = (Var *) ckalloc(sizeof(Var)); - varPtr->value.objPtr = NULL; - varPtr->name = NULL; - varPtr->nsPtr = NULL; - varPtr->hPtr = NULL; - varPtr->refCount = 0; - varPtr->tracePtr = NULL; - varPtr->searchPtr = NULL; - varPtr->flags = (VAR_SCALAR | VAR_UNDEFINED | VAR_IN_HASHTABLE); - return varPtr; -} - -static void -TclCleanupVar(Var * varPtr, Var *arrayPtr) { - if (TclIsVarUndefined(varPtr) && (varPtr->refCount == 0) - && (varPtr->tracePtr == NULL) - && (varPtr->flags & VAR_IN_HASHTABLE)) { - if (varPtr->hPtr != NULL) { - Tcl_DeleteHashEntry(varPtr->hPtr); - } - ckfree((char *) varPtr); - } - if (arrayPtr != NULL) { - if (TclIsVarUndefined(arrayPtr) && (arrayPtr->refCount == 0) - && (arrayPtr->tracePtr == NULL) - && (arrayPtr->flags & VAR_IN_HASHTABLE)) { - if (arrayPtr->hPtr != NULL) { - Tcl_DeleteHashEntry(arrayPtr->hPtr); - } - ckfree((char *) arrayPtr); - } - } -} - -static inline Var * -VarHashCreateVar(TclVarHashTable *tablePtr, Tcl_Obj *key, int *newPtr) { - char *newName = ObjStr(key); - Tcl_HashEntry *hPtr = Tcl_CreateHashEntry(tablePtr, newName, newPtr); - Var *varPtr; - - if (newPtr && *newPtr) { - varPtr = NewVar(); - Tcl_SetHashValue(hPtr, varPtr); - varPtr->hPtr = hPtr; - varPtr->nsPtr = NULL; /* a local variable */ - } else { - varPtr = (Var *) Tcl_GetHashValue(hPtr); - } - - return varPtr; -} - -#define ObjFindNamespace(interp, objPtr) \ - Tcl_FindNamespace((interp), ObjStr(objPtr), NULL, 0); - -#else - -/* - * definitions for tcl 8.5 - */ - -#define VarHashGetValue(hPtr) \ - ((Var *) ((char *)hPtr - TclOffset(VarInHash, entry))) -#define VarHashGetKey(varPtr) \ - (((VarInHash *)(varPtr))->entry.key.objPtr) -#define VarHashDeleteEntry(varPtr) \ - Tcl_DeleteHashEntry(&(((VarInHash *) varPtr)->entry)) -#define VarHashTable(varTable) \ - &(varTable)->table - -static XOTCLINLINE Var * -VarHashCreateVar(TclVarHashTable *tablePtr, Tcl_Obj *key,int *newPtr) -{ - Tcl_HashEntry *hPtr = Tcl_CreateHashEntry((Tcl_HashTable *) tablePtr, - (char *) key, newPtr); - if (hPtr) { - return VarHashGetValue(hPtr); - } else { - return NULL; - } -} - -XOTCLINLINE static Tcl_Namespace * -ObjFindNamespace(Tcl_Interp *interp, Tcl_Obj *objPtr) { - Tcl_Namespace *nsPtr; - - if (TclGetNamespaceFromObj(interp, objPtr, &nsPtr) == TCL_OK) { - return nsPtr; - } else { - return NULL; - } -} -#endif - - -XOTCLINLINE static Var * -lookupVarFromVarTable(TclVarHashTable *varTable, CONST char *simpleName, - XOTclObject *obj) { -#if defined(PRE85) - Var *varPtr = NULL; - Tcl_HashEntry *entryPtr; - - if (varTable) { - entryPtr = Tcl_FindHashEntry(varTable, simpleName); - if (entryPtr) { - varPtr = VarHashGetValue(entryPtr); - } - } - return varPtr; -#else - if (varTable) { - return TclVarHashFindVar(varTable, simpleName); - } - return NULL; -#endif -} - - - -/* * call an XOTcl method */ static int @@ -505,7 +364,7 @@ register char *p = string+strlen(string); while (p > string) { if (*p == ':' && *(p-1) == ':') return p+1; - p--; + *p--; } return string; } @@ -771,16 +630,17 @@ return objPtr; } +static int +GetXOTclObjectFromObj(Tcl_Interp *in, register Tcl_Obj *objPtr, XOTclObject **obj) +{ + int result; + register Tcl_ObjType *cmdType = objPtr->typePtr; #ifdef KEEP_TCL_CMD_TYPE -XOTCLINLINE static Tcl_ObjType * -GetCmdNameType(Tcl_ObjType *cmdType) { static Tcl_ObjType *tclCmdNameType = NULL; - + if (tclCmdNameType == NULL) { # if defined(PRE82) - if (cmdType - && cmdType != &XOTclObjectType - && !strcmp(cmdType->name,"cmdName")) { + if (cmdType && cmdType != &XOTclObjectType && !strcmp(cmdType->name,"cmdName")) { tclCmdNameType = cmdType; } # else @@ -791,51 +651,11 @@ XOTclMutexUnlock(&initMutex); # endif } - return tclCmdNameType; -} #endif -#if NOTUSED -static int -XOTclObjGetObject(Tcl_Interp *in, register Tcl_Obj *objPtr, XOTclObject **obj) { - int result; - register Tcl_ObjType *cmdType = objPtr->typePtr; - XOTclObject *o; - - if (cmdType == &XOTclObjectType) { - o = (XOTclObject*) objPtr->internalRep.otherValuePtr; - if (!(o->flags & XOTCL_DESTROYED)) { - *obj = o; - return TCL_OK; - } - } - - if (cmdType == GetCmdNameType(cmdType)) { - Tcl_Command cmd = Tcl_GetCommandFromObj(in, objPtr); - /*fprintf(stderr,"obj is of type tclCmd\n");*/ - if (cmd) { - o = XOTclGetObjectFromCmdPtr(cmd); - if (o) { - *obj = o; - return TCL_OK; - } - } - } - - o = XOTclpGetObject(in, ObjStr(objPtr)); - if (o) { - *obj = o; - return TCL_OK; - } - return TCL_ERROR; -} -#endif - -static int -XOTclObjConvertObject(Tcl_Interp *in, Tcl_Obj *objPtr, XOTclObject **obj) { - int result; - register Tcl_ObjType *cmdType = objPtr->typePtr; - + /* fprintf(stderr,"GetXotclObjectFromObj '%s' type=%p '%s'\n", + ObjStr(objPtr), + cmdType,cmdType? cmdType->name : "");*/ /* * Only really share the "::x" Tcl_Objs but not "x" because we so not have * references upon object kills and then will get dangling @@ -863,27 +683,27 @@ #ifdef XOTCLOBJ_TRACE if (result == TCL_OK) - fprintf(stderr,"XOTclObjConvertObject tcl %p (%d) xotcl %p (%d) r=%d %s\n", + fprintf(stderr,"GetXOTclObjectFromObj tcl %p (%d) xotcl %p (%d) r=%d %s\n", objPtr, objPtr->refCount, o, o->refCount, refetch, objPtr->bytes); else - fprintf(stderr,"XOTclObjConvertObject tcl %p (%d) **** rc=%d r=%d %s\n", + fprintf(stderr,"GetXOTclObjectFromObj tcl %p (%d) **** rc=%d r=%d %s\n", objPtr, objPtr->refCount, result, refetch, objPtr->bytes); #endif } else { result = TCL_OK; } #ifdef KEEP_TCL_CMD_TYPE - } else if (cmdType == GetCmdNameType(cmdType)) { + } else if (cmdType == tclCmdNameType) { Tcl_Command cmd = Tcl_GetCommandFromObj(in, objPtr); - /*fprintf(stderr,"obj %s is of type tclCmd, cmd=%p\n",ObjStr(objPtr),cmd);*/ + /*fprintf(stderr,"obj is of type tclCmd\n");*/ if (cmd) { XOTclObject *o = XOTclGetObjectFromCmdPtr(cmd); - /* - fprintf(stderr,"Got Object from '%s' %p\n",objPtr->bytes,o); + + /*fprintf(stderr,"Got Object from '%s' %p\n",objPtr->bytes,o); fprintf(stderr,"cmd->objProc %p == %p, proc=%p\n", Tcl_Command_objProc(cmd), XOTclObjDispatch, - Tcl_Command_proc(cmd) ); - */ + Tcl_Command_proc(cmd) );*/ + if (o) { if (obj) *obj = o; result = TCL_OK; @@ -970,7 +790,7 @@ } if (!cls) { - result = XOTclObjConvertObject(in, objPtr, &obj); + result = GetXOTclObjectFromObj(in, objPtr, &obj); if (result == TCL_OK) { cls = XOTclObjectToClass(obj); if (cls) { @@ -1368,28 +1188,52 @@ /* * Copy all obj variables to the newly created namespace */ - if (obj->varTable) { - Tcl_HashSearch search; - Tcl_HashEntry *hPtr; - TclVarHashTable *varTable = Tcl_Namespace_varTable(nsPtr); - Tcl_HashTable *varHashTable = VarHashTable(varTable); - Tcl_HashTable *objHashTable = VarHashTable(obj->varTable); + Tcl_HashSearch search; + Tcl_HashEntry *hPtr, *newHPtr; + register Var *varPtr; - *varHashTable = *objHashTable; /* copy the table */ - - if (objHashTable->buckets == objHashTable->staticBuckets) { - varHashTable->buckets = varHashTable->staticBuckets; - } - for (hPtr = Tcl_FirstHashEntry(varHashTable, &search); hPtr != NULL; + for (hPtr = Tcl_FirstHashEntry(obj->varTable, &search); hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) { -#if defined(PRE85) - Var *varPtr = (Var *) Tcl_GetHashValue(hPtr); - varPtr->nsPtr = (Namespace *)nsPtr; -#endif - hPtr->tablePtr = varHashTable; - } + int new = 0; + char *name = Tcl_GetHashKey(obj->varTable, hPtr); + Tcl_HashTable *varTable = Tcl_Namespace_varTable(nsPtr); + varPtr = (Var *) Tcl_GetHashValue(hPtr); + + if (!name) { + panic("Can't copy: Hash Entry with no name", NULL); + continue; + } + + newHPtr = Tcl_CreateHashEntry(varTable, name, &new); + if (new) { + /* + * put var into new hashtable entry + */ + varPtr->flags |= VAR_IN_HASHTABLE; + Tcl_SetHashValue(newHPtr, varPtr); + varPtr->hPtr = newHPtr; + /* + * Mark the variable as a namespace variable + + if (!(varPtr->flags & VAR_NAMESPACE_VAR)) { + varPtr->flags |= VAR_NAMESPACE_VAR; + varPtr->refCount++; + } + */ + /* + * and correct the namespace information + */ + varPtr->nsPtr = (Namespace *)nsPtr; + } else { + panic("Can't copy varTable variable to new namespace", NULL); + } + } + /* + MEM_COUNT_FREE("obj->varTable",obj->varTable); + */ + Tcl_DeleteHashTable(obj->varTable); ckfree((char *) obj->varTable); obj->varTable = 0; } @@ -1402,9 +1246,18 @@ */ int varResolver(Tcl_Interp *in, CONST char *name, Tcl_Namespace *ns, int flags, Tcl_Var* varPtr) { - *varPtr = (Tcl_Var)lookupVarFromVarTable(Tcl_Namespace_varTable(ns), name,NULL); - /*fprintf(stderr,"lookup '%s' successful %d\n",name, *varPtr != NULL);*/ - return *varPtr ? TCL_OK : TCL_ERROR; + Tcl_HashEntry *entry; + + entry = Tcl_FindHashEntry(Tcl_Namespace_varTable(ns), name); + if (entry != NULL) { + /*fprintf(stderr,"lookup '%s' successful %d\n",name, flags);*/ + *varPtr = (Tcl_Var)Tcl_GetHashValue(entry); + return TCL_OK; + } else { + /*fprintf(stderr,"lookup '%s' failed %d\n",name, flags);*/ + *varPtr = NULL; + return TCL_ERROR; + } } @@ -1557,17 +1410,17 @@ */ static void NSCleanupNamespace(Tcl_Interp *in, Tcl_Namespace* ns) { - TclVarHashTable *varTable = Tcl_Namespace_varTable(ns); + Tcl_HashTable *varTable = Tcl_Namespace_varTable(ns); Tcl_HashTable *cmdTable = Tcl_Namespace_cmdTable(ns); Tcl_HashSearch hSrch; Tcl_HashEntry* hPtr; Tcl_Command cmd; /* * Delete all variables and initialize var table again - * (deleteVars frees the vartable) + * (deletevars frees the vartable) */ TclDeleteVars((Interp *)in, varTable); - TclInitVarHashTable(varTable, (Namespace *)ns); + Tcl_InitHashTable(varTable, TCL_STRING_KEYS); /* * Delete all user-defined procs in the namespace @@ -2193,7 +2046,7 @@ register XOTclCallStackContent *top = cs->top; Tcl_CallFrame *varFramePtr = (Tcl_CallFrame *)Tcl_Interp_varFramePtr(in); - /* fprintf(stderr, "Tcl_Interp_framePtr(in) %p != varFramePtr %p && top->currentFramePtr %p\n", Tcl_Interp_framePtr(in), varFramePtr, top->currentFramePtr);*/ + /*fprintf(stderr, "Tcl_Interp_framePtr(in) %p != varFramePtr %p && top->currentFramePtr %p\n", Tcl_Interp_framePtr(in), varFramePtr, top->currentFramePtr);*/ if (Tcl_Interp_framePtr(in) != varFramePtr && top->currentFramePtr) { XOTclCallStackContent *bot = cs->content + 1; @@ -4225,30 +4078,37 @@ SearchDefaultValuesOnClass(Tcl_Interp *in, XOTclObject *obj, XOTclClass *cmdCl, XOTclClass *targetClass) { int result = TCL_OK; - Var *defaults, *initcmds; + register Tcl_HashEntry *entryPtr = 0, *initcmdsPtr = 0; + Var *defaults = 0, *initcmds = 0; Tcl_Namespace *ns = targetClass->object.nsPtr; - TclVarHashTable *varTable = ns ? Tcl_Namespace_varTable(ns) : targetClass->object.varTable; - defaults = lookupVarFromVarTable(varTable, "__defaults",(XOTclObject*)targetClass); - initcmds = lookupVarFromVarTable(varTable, "__initcmds",(XOTclObject*)targetClass); + if (ns) { + Tcl_HashTable *varTable = Tcl_Namespace_varTable(ns); + entryPtr = Tcl_FindHashEntry(varTable, "__defaults"); + initcmdsPtr = Tcl_FindHashEntry(varTable, "__initcmds"); + } else if (targetClass->object.varTable) { + entryPtr = Tcl_FindHashEntry(targetClass->object.varTable, "__defaults"); + initcmdsPtr = Tcl_FindHashEntry(targetClass->object.varTable, "__initcmds"); + } + if (entryPtr) { + defaults = (Var*) Tcl_GetHashValue(entryPtr); + } + if (initcmdsPtr) { + initcmds = (Var*) Tcl_GetHashValue(initcmdsPtr); + } if (defaults && TclIsVarArray(defaults)) { - TclVarHashTable *tablePtr = defaults->value.tablePtr; + Tcl_HashTable *table = defaults->value.tablePtr; Tcl_HashSearch hSrch; - Tcl_HashEntry* hPtr = tablePtr ? Tcl_FirstHashEntry(VarHashTable(tablePtr), &hSrch) : 0; + Tcl_HashEntry* hPtr = table ? Tcl_FirstHashEntry(table, &hSrch) : 0; - /*fprintf(stderr, "+++ we have defaults for <%s>\n", className(targetClass));*/ + /*fprintf(stderr, "+++ we have defaults for <%s>\n", + className(targetClass));*/ - /* iterate over all elements of the defaults array */ for (; hPtr != 0; hPtr = Tcl_NextHashEntry(&hSrch)) { - Var *val = VarHashGetValue(hPtr); -#if defined(PRE85) - char *varName = Tcl_GetHashKey(tablePtr, hPtr); + char *varName = Tcl_GetHashKey(table, hPtr); Tcl_Obj *varNameObj = Tcl_NewStringObj(varName,-1); -#else - Tcl_Obj *varNameObj = VarHashGetKey(val); -#endif - + Var *val = (Var*)Tcl_GetHashValue(hPtr); INCR_REF_COUNT(varNameObj); if (TclIsVarScalar(val)) { Tcl_Obj *oldValue; @@ -4303,25 +4163,18 @@ DECR_REF_COUNT(varNameObj); } } - + if (initcmds && TclIsVarArray(initcmds)) { - TclVarHashTable *tablePtr = initcmds->value.tablePtr; + Tcl_HashTable *table = initcmds->value.tablePtr; Tcl_HashSearch hSrch; - Tcl_HashEntry* hPtr = tablePtr ? Tcl_FirstHashEntry(VarHashTable(tablePtr), &hSrch) : 0; - + Tcl_HashEntry* hPtr = table ? Tcl_FirstHashEntry(table, &hSrch) : 0; + /*fprintf(stderr, "+++ we have initcmds for <%s>\n", className(targetClass));*/ - /* iterate over the elements of initcmds */ + for (; hPtr != 0; hPtr = Tcl_NextHashEntry(&hSrch)) { - - Var *val = VarHashGetValue(hPtr); -#if defined(PRE85) - char *varName = Tcl_GetHashKey(tablePtr, hPtr); + char *varName = Tcl_GetHashKey(table, hPtr); Tcl_Obj *varNameObj = Tcl_NewStringObj(varName,-1); -#else - Tcl_Obj *varNameObj = VarHashGetKey(val); - char *varName = ObjStr(varNameObj); -#endif - + Var *val = (Var*)Tcl_GetHashValue(hPtr); INCR_REF_COUNT(varNameObj); /*fprintf(stderr,"varexists(%s->%s) = %d\n", ObjStr(obj->cmdName), @@ -4340,22 +4193,20 @@ CallStackPush(in, obj, cmdCl, 0, 1, &varNameObj, XOTCL_CSC_TYPE_PLAIN); /*allow to call self*/ - /*fprintf(stderr,"evaluating '%s' obj=%s\n\n",ObjStr(valueObj),ObjStr(obj->cmdName)); - XOTclCallStackDump(in);*/ - + /* fprintf(stderr,"evaluating '%s'\n",ObjStr(valueObj)); */ + rc = Tcl_EvalObjEx(in, valueObj, TCL_EVAL_DIRECT); CallStackPop(in); + DECR_REF_COUNT(varNameObj); XOTcl_PopFrame(in, obj); if (rc != TCL_OK) { - DECR_REF_COUNT(varNameObj); return rc; } /* fprintf(stderr,"... varexists(%s->%s) = %d\n", ObjStr(obj->cmdName), varName, varExists(in, obj, varName, NULL, 0, 0)); */ } } - DECR_REF_COUNT(varNameObj); } } return result; @@ -4407,7 +4258,7 @@ if (!cl) return XOTclObjErrType(in, objv[0], "Class"); if (objc != 2) return XOTclObjErrArgCnt(in, cl->object.cmdName, "searchDefaults obj"); - if (XOTclObjConvertObject(in, objv[1], &defaultObj) != TCL_OK) + if (GetXOTclObjectFromObj(in, objv[1], &defaultObj) != TCL_OK) return XOTclVarErrMsg(in, "Can't find default object ", ObjStr(objv[1]), (char *) NULL); @@ -5197,7 +5048,7 @@ /* arg = ObjStr(argsv[i]); fprintf(stderr, "*** argparse0 arg='%s'\n",arg);*/ rc = Tcl_ListObjGetElements(in, argsv[i], &npac, &npav); - if (rc == TCL_OK && npac > 0) { + if (rc == TCL_OK) { arg = ObjStr(npav[0]); /*fprintf(stderr, "*** argparse1 arg='%s' rc=%d\n",arg,rc);*/ if (*arg == '-') { @@ -5347,54 +5198,19 @@ return TCL_OK; } -#if !defined(PRE85) -static int -ListVarKeys(Tcl_Interp *in, Tcl_HashTable *tablePtr, char *pattern) { - Tcl_HashEntry* hPtr; - if (pattern && noMetaChars(pattern)) { - Tcl_Obj *patternObj = Tcl_NewStringObj(pattern, -1); - INCR_REF_COUNT(patternObj); - - hPtr = tablePtr ? Tcl_CreateHashEntry(tablePtr, (char *)patternObj, NULL) : 0; - if (hPtr) { - Var *val = VarHashGetValue(hPtr); - Tcl_SetObjResult(in, VarHashGetKey(val)); - } else { - Tcl_SetObjResult(in, XOTclGlobalObjects[XOTE_EMPTY]); - } - DECR_REF_COUNT(patternObj); - } else { - Tcl_Obj *list = Tcl_NewListObj(0, NULL); - Tcl_HashSearch hSrch; - hPtr = tablePtr ? Tcl_FirstHashEntry(tablePtr, &hSrch) : 0; - for (; hPtr; hPtr = Tcl_NextHashEntry(&hSrch)) { - Var *val = VarHashGetValue(hPtr); - Tcl_Obj *key = VarHashGetKey(val); - if (!pattern || Tcl_StringMatch(ObjStr(key), pattern)) { - Tcl_ListObjAppendElement(in, list, key); - } - } - Tcl_SetObjResult(in, list); - } - return TCL_OK; -} -#endif - - static int ListVars(Tcl_Interp *in, XOTclObject *obj, char *pattern) { Tcl_Obj *varlist, *okList, *element; int i, length; - TclVarHashTable *varTable = obj->nsPtr ? Tcl_Namespace_varTable(obj->nsPtr) : obj->varTable; -#if defined(PRE85) - ListKeys(in, varTable, pattern); -#else - ListVarKeys(in, VarHashTable(varTable), pattern); -#endif + if (obj->nsPtr) { + Tcl_HashTable *varTable = Tcl_Namespace_varTable(obj->nsPtr); + ListKeys(in, varTable, pattern); + } else { + ListKeys(in, obj->varTable, pattern); + } varlist = Tcl_GetObjResult(in); - Tcl_ListObjLength(in, varlist, &length); okList = Tcl_NewListObj(0, NULL); for (i=0; ifilterStack != NULL) FilterStackPop(obj); - cmd = Tcl_GetCommandFromObj(in, obj->cmdName); + cmd = Tcl_FindCommand(in, ObjStr(obj->cmdName), 0, 0); if (cmd != NULL) Tcl_Command_deleteProc(cmd) = 0; @@ -7293,7 +7109,7 @@ className = (objc == 2) ? objv[1] : obj->cmdName; Tcl_SetIntObj(Tcl_GetObjResult(in), - (XOTclObjConvertObject(in, className, &o) == TCL_OK + (GetXOTclObjectFromObj(in, className, &o) == TCL_OK && XOTclObjectIsClass(o) )); return TCL_OK; } @@ -7305,7 +7121,7 @@ if (!obj) return XOTclObjErrType(in, objv[0], "Object"); if (objc != 2) return XOTclObjErrArgCnt(in, obj->cmdName, "isobject "); - if (XOTclObjConvertObject(in, objv[1], &o) == TCL_OK) { + if (GetXOTclObjectFromObj(in, objv[1], &o) == TCL_OK) { Tcl_SetIntObj(Tcl_GetObjResult(in), 1); } else { Tcl_SetIntObj(Tcl_GetObjResult(in), 0); @@ -7362,7 +7178,7 @@ className = (objc == 2) ? objv[1] : obj->cmdName; - if (XOTclObjConvertObject(in, className, &o) == TCL_OK + if (GetXOTclObjectFromObj(in, className, &o) == TCL_OK && XOTclObjectIsClass(o) && IsMetaClass(in, (XOTclClass*)o)) { Tcl_SetIntObj(Tcl_GetObjResult(in), 1); @@ -7904,13 +7720,54 @@ return result; } +/* + * We need NewVar from tclVar.c ... but its not exported + */ +static Var *NewVar() { + register Var *varPtr; + + varPtr = (Var *) ckalloc(sizeof(Var)); + varPtr->value.objPtr = NULL; + varPtr->name = NULL; + varPtr->nsPtr = NULL; + varPtr->hPtr = NULL; + varPtr->refCount = 0; + varPtr->tracePtr = NULL; + varPtr->searchPtr = NULL; + varPtr->flags = (VAR_SCALAR | VAR_UNDEFINED | VAR_IN_HASHTABLE); + return varPtr; +} + +static void +CleanupVar(Var * varPtr, Var *arrayPtr) { + if (TclIsVarUndefined(varPtr) && (varPtr->refCount == 0) + && (varPtr->tracePtr == NULL) + && (varPtr->flags & VAR_IN_HASHTABLE)) { + if (varPtr->hPtr != NULL) { + Tcl_DeleteHashEntry(varPtr->hPtr); + } + ckfree((char *) varPtr); + } + if (arrayPtr != NULL) { + if (TclIsVarUndefined(arrayPtr) && (arrayPtr->refCount == 0) + && (arrayPtr->tracePtr == NULL) + && (arrayPtr->flags & VAR_IN_HASHTABLE)) { + if (arrayPtr->hPtr != NULL) { + Tcl_DeleteHashEntry(arrayPtr->hPtr); + } + ckfree((char *) arrayPtr); + } + } +} + static int GetInstVarIntoCurrentScope(Tcl_Interp *in, XOTclObject *obj, - Tcl_Obj *varName, Tcl_Obj *newName) { - Var *varPtr = NULL, *otherPtr = NULL, *arrayPtr; + char *varName, char *newName) { + Var *varPtr, *otherPtr = 0, *arrayPtr; int new; Tcl_CallFrame *varFramePtr; - TclVarHashTable *tablePtr; + Tcl_HashEntry *hPtr; + Tcl_HashTable *tablePtr; XOTcl_FrameDecls; int flgs = TCL_LEAVE_ERR_MSG | @@ -7921,12 +7778,12 @@ flgs = flgs|TCL_NAMESPACE_ONLY; } - otherPtr = TclObjLookupVar(in, varName, (char *) NULL, flgs, "define", + otherPtr = TclLookupVar(in, varName, (char *) NULL, flgs, "define", /*createPart1*/ 1, /*createPart2*/ 1, &arrayPtr); XOTcl_PopFrame(in, obj); if (otherPtr == NULL) { - return XOTclVarErrMsg(in, "can't make instvar ", ObjStr(varName), + return XOTclVarErrMsg(in, "can't make instvar ", varName, ": can't find variable on ", ObjStr(obj->cmdName), (char *) NULL); } @@ -7941,7 +7798,7 @@ * see Tcl_VariableObjCmd ... */ if (arrayPtr) { - return XOTclVarErrMsg(in, "can't make instvar ", ObjStr(varName), + return XOTclVarErrMsg(in, "can't make instvar ", varName, " on ", ObjStr(obj->cmdName), ": variable cannot be an element in an array;", " use an alias or objeval.", (char *) NULL); @@ -7957,19 +7814,20 @@ * variable linked to the new namespace variable "varName". */ if (varFramePtr != NULL && Tcl_CallFrame_isProcCallFrame(varFramePtr)) { - Proc *procPtr = Tcl_CallFrame_procPtr(varFramePtr); - int localCt = procPtr->numCompiledLocals; + Proc *procPtr = Tcl_CallFrame_procPtr(varFramePtr); + int localCt = procPtr->numCompiledLocals; CompiledLocal *localPtr = procPtr->firstLocalPtr; - Var *localVarPtr = Tcl_CallFrame_compiledLocals(varFramePtr); - char *newNameString = ObjStr(newName); - int i, nameLen = strlen(newNameString); + Var *localVarPtr = Tcl_CallFrame_compiledLocals(varFramePtr); + int nameLen = strlen(newName); + int i; + varPtr = NULL; for (i = 0; i < localCt; i++) { /* look in compiled locals */ if (!TclIsVarTemporary(localPtr)) { - char *localName = localPtr->name; - if ((newNameString[0] == localName[0]) + char *localName = localVarPtr->name; + if ((newName[0] == localName[0]) && (nameLen == localPtr->nameLength) - && (strcmp(newNameString, localName) == 0)) { + && (strcmp(newName, localName) == 0)) { varPtr = localVarPtr; new = 0; break; @@ -7982,12 +7840,19 @@ if (varPtr == NULL) { /* look in frame's local var hashtable */ tablePtr = Tcl_CallFrame_varTablePtr(varFramePtr); if (tablePtr == NULL) { - - tablePtr = (TclVarHashTable *) ckalloc(sizeof(TclVarHashTable)); - TclInitVarHashTable(tablePtr, NULL); + tablePtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); + Tcl_InitHashTable(tablePtr, TCL_STRING_KEYS); Tcl_CallFrame_varTablePtr(varFramePtr) = tablePtr; } - varPtr = VarHashCreateVar(tablePtr, newName, &new); + hPtr = Tcl_CreateHashEntry(tablePtr, newName, &new); + if (new) { + varPtr = NewVar(); + Tcl_SetHashValue(hPtr, varPtr); + varPtr->hPtr = hPtr; + varPtr->nsPtr = (Namespace *)varFramePtr->nsPtr; + } else { + varPtr = (Var *) Tcl_GetHashValue(hPtr); + } } /* * if we define an alias (newName != varName), be sure that @@ -8004,29 +7869,26 @@ return TCL_OK; } - fprintf(stderr, "linkvar flags=%x\n",linkPtr->flags); - panic("new linkvar... When does this happen?",0); - - VarHashRefCount(otherPtr)--; + linkPtr->refCount--; if (TclIsVarUndefined(linkPtr)) { - TclCleanupVar(linkPtr, (Var *) NULL); + CleanupVar(linkPtr, (Var *) NULL); } - /* - return XOTclVarErrMsg(in, "can't link instvar", (char *) NULL); - */ + /* + return XOTclVarErrMsg(in, "can't instvar to link", (char *) NULL); + */ } else if (!TclIsVarUndefined(varPtr)) { - return XOTclVarErrMsg(in, "variable '", ObjStr(newName), + return XOTclVarErrMsg(in, "variable '", newName, "' exists already", (char *) NULL); - } else if (TclIsVarTraced(varPtr)) { - return XOTclVarErrMsg(in, "variable '", ObjStr(newName), + } else if (varPtr->tracePtr != NULL) { + return XOTclVarErrMsg(in, "variable '", newName, "' has traces: can't use for instvar", (char *) NULL); } } TclSetVarLink(varPtr); TclClearVarUndefined(varPtr); varPtr->value.linkPtr = otherPtr; - VarHashRefCount(otherPtr)++; + otherPtr->refCount++; } return TCL_OK; } @@ -8391,7 +8253,7 @@ if (tcd->objProc) { result = (tcd->objProc)(tcd->cd, in, objc, objv); } else if (tcd->cmdName->typePtr == &XOTclObjectType - && XOTclObjConvertObject(in, tcd->cmdName, (void*)&cd) == TCL_OK) { + && GetXOTclObjectFromObj(in, tcd->cmdName, (void*)&cd) == TCL_OK) { /*fprintf(stderr, "XOTcl object %s, objc=%d\n", ObjStr(tcd->cmdName),objc);*/ result = ObjDispatch(cd, in, objc, objv, 0); } else { @@ -8571,11 +8433,11 @@ for (i=1; i 4) return XOTclObjErrArgCnt(in, objv[0], "::xotcl::instvarset obj var ?value?"); - XOTclObjConvertObject(in, objv[1], &obj); + GetXOTclObjectFromObj(in, objv[1], &obj); if (!obj) return XOTclObjErrType(in, objv[0], "Object"); return setInstVar(in, obj ,objv[2], objc == 4 ? objv[3] : NULL); @@ -8945,7 +8807,7 @@ switch (opt) { case mixinIdx: case filterIdx: { - XOTclObjConvertObject(in, objv[1], &obj); + GetXOTclObjectFromObj(in, objv[1], &obj); if (!obj) return XOTclObjErrType(in, objv[1], "Object"); if (Tcl_ListObjGetElements(in, objv[3], &oc, &ov) != TCL_OK) return TCL_ERROR; @@ -8971,7 +8833,7 @@ } case classIdx: { - XOTclObjConvertObject(in, objv[1], &obj); + GetXOTclObjectFromObj(in, objv[1], &obj); if (!obj) return XOTclObjErrType(in, objv[1], "Object"); GetXOTclClassFromObj(in, objv[3], &cl, 1); if (!cl) return XOTclErrBadVal(in, "class", "a class", ObjStr(objv[1])); @@ -9357,7 +9219,7 @@ if (objc < 2) return XOTclObjErrArgCnt(in, cl->object.cmdName, "instdestroy "); - if (XOTclObjConvertObject(in, objv[1], &delobj) != TCL_OK) + if (GetXOTclObjectFromObj(in, objv[1], &delobj) != TCL_OK) return XOTclVarErrMsg(in, "Can't destroy object ", ObjStr(objv[1]), " that does not exist.", (char *) NULL); @@ -9401,7 +9263,7 @@ ns = f->nsPtr; f = Tcl_CallFrame_callerPtr(f); } else { - ns = Tcl_GetGlobalNamespace(in); + ns = Tcl_FindNamespace(in, "::", NULL, 0); } } /*fprintf(stderr, "found ns %p '%s'\n",ns, ns?ns->fullName:"NULL");*/ @@ -9422,7 +9284,7 @@ ns, ns?ns->fullName : "" );*/ } else { /* fprintf(stderr, "nothing found, use ::\n"); */ - ns = Tcl_GetGlobalNamespace(in); + ns = Tcl_FindNamespace(in, "::", NULL, 0); } } } @@ -9450,14 +9312,14 @@ fprintf(stderr, "type(%s)=%p %s %d\n", ObjStr(objv[1]), objv[1]->typePtr, objv[1]->typePtr? objv[1]->typePtr->name:"NULL", - XOTclObjConvertObject(in, objv[1], &newobj) + GetXOTclObjectFromObj(in, objv[1], &newobj) ); /* * if the lookup via GetObject for the object succeeds, * the object exists already, * and we do not overwrite it, but re-create it */ - if (XOTclObjConvertObject(in, objv[1], &newobj) == TCL_OK) { + if (GetXOTclObjectFromObj(in, objv[1], &newobj) == TCL_OK) { fprintf(stderr, "lookup successful\n"); result = doCleanup(in, newobj, &cl->object, objc, objv); } else @@ -9580,7 +9442,7 @@ goto create_method_exit; nameObj = Tcl_GetObjResult(in); - if (XOTclObjConvertObject(in, nameObj, &newobj) != TCL_OK) { + if (GetXOTclObjectFromObj(in, nameObj, &newobj) != TCL_OK) { result = XOTclErrMsg(in, "couldn't find result of alloc", TCL_STATIC); goto create_method_exit; } @@ -9622,7 +9484,7 @@ char *result = NULL; if (RUNTIME_STATE(in)->exitHandlerDestroyRound == XOTCL_EXITHANDLER_OFF) { - if (XOTclObjConvertObject(in, obj, &o) == TCL_OK) { + if (GetXOTclObjectFromObj(in, obj, &o) == TCL_OK) { Tcl_Obj *res = Tcl_GetObjResult(in); /* save the result */ INCR_REF_COUNT(res); @@ -9665,7 +9527,7 @@ char *option = ObjStr(objv[i]); if (*option == '-' && strcmp(option,"-childof")==0 && iobject.cmdName, "recreate ?args?"); - if (XOTclObjConvertObject(in, objv[1], &newobj) != TCL_OK) + if (GetXOTclObjectFromObj(in, objv[1], &newobj) != TCL_OK) return XOTclVarErrMsg(in, "can't recreate not existing obj ", ObjStr(objv[1]), (char *) NULL); @@ -10500,11 +10362,11 @@ if (objc != 3) return XOTclObjErrArgCnt(in, NULL, "namespace_copycmds fromNs toNs"); - ns = ObjFindNamespace(in, objv[1]); + ns = Tcl_FindNamespace(in, ObjStr(objv[1]), (Tcl_Namespace *)NULL, 0); if (!ns) return TCL_OK; - newNs = ObjFindNamespace(in, objv[2]); + newNs = Tcl_FindNamespace(in, ObjStr(objv[2]), (Tcl_Namespace *)NULL, 0); if (!newNs) return XOTclVarErrMsg(in, "CopyCmds: Destination namespace ", ObjStr(objv[2]), " does not exist", (char *) NULL); @@ -10537,13 +10399,12 @@ if (cmd != NULL) { /*fprintf(stderr, "%s already exists\n", newName);*/ if (!XOTclpGetObject(in, newName)) { - /* command or instproc will be deleted & then copied */ + /* command or instproc will be deleted & than copied */ Tcl_DeleteCommandFromToken(in, cmd); } else { /* don't overwrite objects -> will be recreated */ hPtr = Tcl_NextHashEntry(&hSrch); - DECR_REF_COUNT(newFullCmdName); - DECR_REF_COUNT(oldFullCmdName); + DECR_REF_COUNT(newFullCmdName); DECR_REF_COUNT(oldFullCmdName); continue; } } @@ -10558,8 +10419,7 @@ Tcl_AppendStringsToObj(Tcl_GetObjResult(in), "can't copy ", " \"", oldName, "\": command doesn't exist", (char *) NULL); - DECR_REF_COUNT(newFullCmdName); - DECR_REF_COUNT(oldFullCmdName); + DECR_REF_COUNT(newFullCmdName); DECR_REF_COUNT(oldFullCmdName); return TCL_ERROR; } /* @@ -10693,136 +10553,106 @@ XOTcl_NSCopyVars(ClientData cd, Tcl_Interp *in, int objc, Tcl_Obj *CONST objv[]) { Tcl_Namespace *ns, *newNs; Var *varPtr = 0; + Tcl_DString ds, *dsPtr = &ds; Tcl_HashSearch hSrch; Tcl_HashEntry* hPtr; - TclVarHashTable *varTable; + Tcl_HashTable *varTable; int rc = TCL_OK; char *varName; XOTclObject *obj; char *destFullName; - Tcl_Obj *destFullNameObj; - Tcl_CallFrame frame; - Tcl_Obj *varNameObj = NULL; - Tcl_Obj *nobjv[4]; - int nobjc; - Tcl_Obj *setObj; - + if (objc != 3) return XOTclObjErrArgCnt(in, NULL, "namespace_copyvars fromNs toNs"); - ns = ObjFindNamespace(in, objv[1]); + ns = Tcl_FindNamespace(in, ObjStr(objv[1]), (Tcl_Namespace *)NULL, 0); if (ns) { - newNs = ObjFindNamespace(in, objv[2]); + newNs = Tcl_FindNamespace(in, ObjStr(objv[2]), (Tcl_Namespace *)NULL, 0); if (!newNs) return XOTclVarErrMsg(in, "CopyVars: Destination namespace ", ObjStr(objv[2]), " does not exist", (char *) NULL); - - obj = XOTclpGetObject(in, ObjStr(objv[1])); - destFullName = newNs->fullName; - destFullNameObj = Tcl_NewStringObj(destFullName, -1); - INCR_REF_COUNT(destFullNameObj); + obj = XOTclpGetObject(in, ns->fullName); varTable = Tcl_Namespace_varTable(ns); - Tcl_PushCallFrame(in,&frame,newNs,0); + destFullName = newNs->fullName; } else { XOTclObject *newObj; - if (XOTclObjConvertObject(in, objv[1], &obj) != TCL_OK) { + obj = XOTclpGetObject(in, ObjStr(objv[1])); + if (!obj) return XOTclVarErrMsg(in, "CopyVars: Origin object/namespace ", ObjStr(objv[1]), " does not exist", (char *) NULL); - } - if (XOTclObjConvertObject(in, objv[2], &newObj) != TCL_OK) { + newObj = XOTclpGetObject(in, ObjStr(objv[2])); + if (!newObj) return XOTclVarErrMsg(in, "CopyVars: Destination object/namespace ", ObjStr(objv[2]), " does not exist", (char *) NULL); - } varTable = obj->varTable; - destFullNameObj = newObj->cmdName; - destFullName = ObjStr(destFullNameObj); + destFullName = ObjStr(newObj->cmdName); } - setObj= Tcl_NewStringObj("set", 3); - INCR_REF_COUNT(setObj); - nobjc = 4; - nobjv[0] = destFullNameObj; - nobjv[1] = setObj; - - /* copy all vars in the namespace */ - hPtr = varTable ? Tcl_FirstHashEntry(VarHashTable(varTable), &hSrch) : 0; + /* copy all vars in the ns */ + hPtr = varTable ? Tcl_FirstHashEntry(varTable, &hSrch) : 0; while (hPtr != NULL) { -#if defined(PRE85) varPtr = (Var *) Tcl_GetHashValue(hPtr); - varName = Tcl_GetHashKey(VarHashTable(varTable), hPtr); - varNameObj = Tcl_NewStringObj(varName, -1); - INCR_REF_COUNT(varNameObj); -#else - varPtr = VarHashGetValue(hPtr); - varNameObj = VarHashGetKey(varPtr); - varName = ObjStr(varNameObj); -#endif if (!TclIsVarUndefined(varPtr) && !TclIsVarLink(varPtr)) { + varName = Tcl_GetHashKey(varTable, hPtr); + if (TclIsVarScalar(varPtr)) { /* it may seem odd that we do not copy obj vars with the * same SetVar2 as normal vars, but we want to dispatch it in order to * be able to intercept the copying */ - if (obj) { - nobjv[2] = varNameObj; - nobjv[3] = varPtr->value.objPtr; - rc = Tcl_EvalObjv(in, nobjc, nobjv, 0); + DSTRING_INIT(dsPtr); + Tcl_DStringAppendElement(dsPtr, destFullName); + Tcl_DStringAppendElement(dsPtr, "set"); + Tcl_DStringAppendElement(dsPtr, varName); + Tcl_DStringAppendElement(dsPtr, ObjStr(varPtr->value.objPtr)); + rc = Tcl_EvalEx(in, Tcl_DStringValue(dsPtr),Tcl_DStringLength(dsPtr),0); + DSTRING_FREE(dsPtr); } else { - Tcl_ObjSetVar2(in, varNameObj, NULL, varPtr->value.objPtr, TCL_NAMESPACE_ONLY); + ALLOC_NAME_NS(&ds, destFullName, varName); + Tcl_SetVar2(in, Tcl_DStringValue(&ds), 0, + ObjStr(varPtr->value.objPtr), TCL_GLOBAL_ONLY); + DSTRING_FREE(&ds); } } else { if (TclIsVarArray(varPtr)) { - //// HERE!! PRE85 Why not [array get/set] based? Let the core iterate - TclVarHashTable *aTable = varPtr->value.tablePtr; + Tcl_HashTable *aTable = varPtr->value.tablePtr; Tcl_HashSearch ahSrch; - Tcl_HashEntry* ahPtr = aTable ? Tcl_FirstHashEntry(VarHashTable(aTable), &ahSrch) :0; - Tcl_Obj *eltNameObj = NULL; + Tcl_HashEntry* ahPtr = aTable ? Tcl_FirstHashEntry(aTable, &ahSrch) : 0; + for (; ahPtr != 0; ahPtr = Tcl_NextHashEntry(&ahSrch)) { - char *eltName; - Var *eltVar; -#if defined(PRE85) - eltName = Tcl_GetHashKey(VarHashTable(aTable), ahPtr); - eltVar = (Var *) Tcl_GetHashValue(ahPtr); -#else - eltVar = VarHashGetValue(ahPtr); - eltNameObj = VarHashGetKey(eltVar); - eltName = ObjStr(eltNameObj); -#endif + char *eltName = Tcl_GetHashKey(aTable, ahPtr); + Var *eltVar = (Var*) Tcl_GetHashValue(ahPtr); + if (TclIsVarScalar(eltVar)) { if (obj) { - Tcl_Obj *fullVarNameObj = Tcl_DuplicateObj(varNameObj); - - INCR_REF_COUNT(fullVarNameObj); - Tcl_AppendStringsToObj(fullVarNameObj, "(", eltName, ")", NULL); - nobjv[2] = fullVarNameObj; - nobjv[3] = eltVar->value.objPtr; - rc = Tcl_EvalObjv(in, nobjc, nobjv, 0); - DECR_REF_COUNT(fullVarNameObj); + Tcl_DString ds2, *ds2Ptr = &ds2; + DSTRING_INIT(dsPtr); + Tcl_DStringAppendElement(dsPtr, destFullName); + Tcl_DStringAppendElement(dsPtr, "set"); + DSTRING_INIT(ds2Ptr); + Tcl_DStringAppend(ds2Ptr, varName, -1); + Tcl_DStringAppend(ds2Ptr, "(", 1); + Tcl_DStringAppend(ds2Ptr, eltName, -1); + Tcl_DStringAppend(ds2Ptr, ")", 1); + Tcl_DStringAppendElement(dsPtr, Tcl_DStringValue(ds2Ptr)); + Tcl_DStringAppendElement(dsPtr, ObjStr(eltVar->value.objPtr)); + /*fprintf(stderr,"array CP '%s'\n",Tcl_DStringValue(dsPtr));*/ + rc = Tcl_EvalEx(in, Tcl_DStringValue(dsPtr), Tcl_DStringLength(dsPtr),0); + DSTRING_FREE(dsPtr); + DSTRING_FREE(ds2Ptr); } else { -#if defined(PRE85) - eltNameObj = Tcl_NewStringObj(eltName, -1); - INCR_REF_COUNT(eltNameObj); -#endif - Tcl_ObjSetVar2(in, varNameObj, eltNameObj, varPtr->value.objPtr, TCL_NAMESPACE_ONLY); -#if defined(PRE85) - DECR_REF_COUNT(eltNameObj); -#endif + ALLOC_NAME_NS(&ds, destFullName, varName); + Tcl_SetVar2(in, Tcl_DStringValue(&ds), eltName, + ObjStr(eltVar->value.objPtr), TCL_GLOBAL_ONLY); + DSTRING_FREE(&ds); } } } } } } -#if defined(PRE85) - DECR_REF_COUNT(varNameObj); -#endif hPtr = Tcl_NextHashEntry(&hSrch); } - if (ns) { - DECR_REF_COUNT(destFullNameObj); - Tcl_PopCallFrame(in); - } - DECR_REF_COUNT(setObj); return rc; } @@ -11002,9 +10832,9 @@ r1 = Tcl_ListObjGetElements(in, nonposArgsDefv[i], &npac, &npav); if (r1 == TCL_OK) { if (npac == 3) { - Tcl_ObjSetVar2(in, npav[0], NULL, npav[2], 0); + Tcl_SetVar2Ex(in, ObjStr(npav[0]), NULL, npav[2], 0); } else if (npac == 2 && !strcmp(ObjStr(npav[1]), "switch")) { - Tcl_ObjSetVar2(in, npav[0], NULL, Tcl_NewBooleanObj(0), 0); + Tcl_SetVar2Ex(in, ObjStr(npav[0]), NULL, Tcl_NewBooleanObj(0), 0); } } } @@ -11031,18 +10861,14 @@ if (isNonposArg(in, argStr, nonposArgsDefc, nonposArgsDefv, &var,&type)) { if (*type == 's' && !strcmp(type, "switch")) { int bool; - Tcl_Obj *boolObj = Tcl_ObjGetVar2(in, var, 0, 0); - if (Tcl_GetBooleanFromObj(in, boolObj, &bool) != TCL_OK) { - return XOTclVarErrMsg(in, "Non positional arg '",argStr, - "': no boolean value", (char *) NULL); - } - Tcl_ObjSetVar2(in, var, NULL, boolObj, 0); + Tcl_GetBooleanFromObj(in, Tcl_ObjGetVar2(in, var, 0, 0), &bool); + Tcl_SetVar2(in, ObjStr(var), 0, bool ? "0" : "1", 0); } else { i++; if (i >= argsc) return XOTclVarErrMsg(in, "Non positional arg '", argStr, "': value missing", (char *) NULL); - Tcl_ObjSetVar2(in, var, NULL, argsv[i], 0); + Tcl_SetVar2Ex(in, ObjStr(var), NULL, argsv[i], 0); } } else { endOfNonposArgsReached = 1; @@ -11071,7 +10897,7 @@ INCR_REF_COUNT(list); for(; i < argsc; i++) Tcl_ListObjAppendElement(in, list, argsv[i]); - Tcl_ObjSetVar2(in, ordinaryArgsDefv[ordinaryArgsCounter], NULL, list, 0); + Tcl_SetVar2Ex(in, ObjStr(ordinaryArgsDefv[ordinaryArgsCounter]), NULL, list, 0); DECR_REF_COUNT(list); } else { /* break down this argument, if it has a default value, @@ -11082,7 +10908,7 @@ if (r4 == TCL_OK && defaultValueObjc == 2) { ordinaryArg = defaultValueObjv[0]; } - Tcl_ObjSetVar2(in, ordinaryArg, NULL, argsv[i], 0); + Tcl_SetVar2Ex(in, ObjStr(ordinaryArg), NULL, argsv[i], 0); } ordinaryArgsCounter++; } @@ -11106,7 +10932,7 @@ ObjStr(ordinaryArgsDefv[ordinaryArgsCounter]), r4,defaultValueObjc);*/ if (r4 == TCL_OK && defaultValueObjc == 2) { - Tcl_ObjSetVar2(in, defaultValueObjv[0], NULL, defaultValueObjv[1], 0); + Tcl_SetVar2Ex(in, ObjStr(defaultValueObjv[0]), NULL, defaultValueObjv[1], 0); } else { Tcl_Obj *tmp = NonposArgsFormat(in, nonposArgs->nonposArgs); XOTclVarErrMsg(in, "wrong # args for method '", @@ -11891,15 +11717,10 @@ /* * Parameter Class */ - { - XOTclObject *paramObject; - paramCl = PrimitiveCCreate(in, XOTclGlobalStrings[XOTE_PARAM_CL], thecls); - paramObject = ¶mCl->object; - XOTclAddPMethod(in, (XOTcl_Object*) paramObject, + paramCl = PrimitiveCCreate(in, XOTclGlobalStrings[XOTE_PARAM_CL], thecls); + XOTclAddPMethod(in, (XOTcl_Object*) ¶mCl->object, XOTclGlobalStrings[XOTE_SEARCH_DEFAULTS], (Tcl_ObjCmdProc*) ParameterSearchDefaultsMethod, 0, 0); - } - /* * set runtime version information in Tcl variable */ Index: xotcl/generic/xotclAccessInt.h =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/generic/xotclAccessInt.h (.../xotclAccessInt.h) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/generic/xotclAccessInt.h (.../xotclAccessInt.h) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -24,8 +24,6 @@ #define Tcl_Namespace_activationCount(nsPtr) ((Namespace *)nsPtr)->activationCount #define Tcl_Namespace_deleteProc(nsPtr) ((Namespace *)nsPtr)->deleteProc - - #define Tcl_Command_refCount(cmd) ((Command *)cmd)->refCount #define Tcl_Command_cmdEpoch(cmd) ((Command *)cmd)->cmdEpoch /* the following items could be obtained from Index: xotcl/generic/xotclInt.h =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/generic/xotclInt.h (.../xotclInt.h) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/generic/xotclInt.h (.../xotclInt.h) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,5 +1,5 @@ /* -*- Mode: c++ -*- - * $Id: xotclInt.h,v 1.21 2007/08/06 11:35:56 neumann Exp $ + * $Id: xotclInt.h,v 1.22 2007/08/14 16:36:47 neumann Exp $ * Extended Object Tcl (XOTcl) * * Copyright (C) 1999-2006 Gustaf Neumann, Uwe Zdun @@ -39,10 +39,6 @@ /* * Makros */ -#if defined(PRE85) -# define TclVarHashTable Tcl_HashTable -#endif - #ifdef XOTCL_MEM_COUNT Tcl_HashTable xotclMemCount; extern int xotclMemCountInterpCounter; @@ -297,7 +293,7 @@ Note that it is possible that between push and pop a obj->nsPtr can be created (e.g. during a read trace) */ -#define XOTcl_FrameDecls Tcl_CallFrame frame; int frame_constructed = 1 +#define XOTcl_FrameDecls Tcl_CallFrame frame; int frame_constructed = 1; #define XOTcl_PushFrame(interp,obj) \ if ((obj)->nsPtr) { \ frame_constructed = 0; \ @@ -481,7 +477,7 @@ Tcl_Command id; Tcl_Interp *teardown; struct XOTclClass *cl; - TclVarHashTable *varTable; + Tcl_HashTable *varTable; Tcl_Namespace *nsPtr; XOTclObjectOpt *opt; struct XOTclCmdList *filterOrder; Index: xotcl/generic/xotclShadow.c =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/generic/xotclShadow.c (.../xotclShadow.c) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/generic/xotclShadow.c (.../xotclShadow.c) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,5 +1,5 @@ /* -*- Mode: c++ -*- - * $Id: xotclShadow.c,v 1.7 2007/08/06 11:35:56 neumann Exp $ + * $Id: xotclShadow.c,v 1.8 2007/08/14 16:36:47 neumann Exp $ * * Extended Object Tcl (XOTcl) * @@ -153,9 +153,7 @@ rc|= XOTclReplaceCommand(in, XOTE_SUBST, 0, initialized); #endif /* for the following commands, we have to add our own semantics */ -#if 1 rc|= XOTclReplaceCommand(in, XOTE_INFO, XOTcl_InfoObjCmd, initialized); -#endif rc|= XOTclReplaceCommand(in, XOTE_RENAME, XOTcl_RenameObjCmd, initialized); } else if (load == SHADOW_REFETCH) { Index: xotcl/library/actiweb/WebDocument.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/actiweb/WebDocument.xotcl (.../WebDocument.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/actiweb/WebDocument.xotcl (.../WebDocument.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,4 +1,4 @@ -# $Id: WebDocument.xotcl,v 1.7 2007/08/06 11:35:56 neumann Exp $ +# $Id: WebDocument.xotcl,v 1.8 2007/08/14 16:36:47 neumann Exp $ package provide xotcl::actiweb::webDocument 0.8 @@ -136,7 +136,7 @@ Class GraphicDirectoryObjectifier -superclass FileObjectifier \ - -parameter {{thumbnaildir [::xotcl::tmpdir]}} + -parameter {{thumbnaildir /tmp}} GraphicDirectoryObjectifier instproc objectifyTree {place dir {prefix ""}} { if {[file isdirectory $dir]} { set indexpage "" Index: xotcl/library/comm/Access.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/comm/Access.xotcl (.../Access.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/comm/Access.xotcl (.../Access.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,4 +1,4 @@ -# -*- tcl -*- $Id: Access.xotcl,v 1.7 2007/08/06 11:35:56 neumann Exp $ +# -*- tcl -*- $Id: Access.xotcl,v 1.8 2007/08/14 16:36:47 neumann Exp $ set httpAccessVersion 0.91 package provide xotcl::comm::httpAccess $httpAccessVersion Index: xotcl/library/comm/Httpd.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/comm/Httpd.xotcl (.../Httpd.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/comm/Httpd.xotcl (.../Httpd.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,4 +1,4 @@ -# -*- tcl -*- $Id: Httpd.xotcl,v 1.7 2007/08/06 11:35:56 neumann Exp $ +# -*- tcl -*- $Id: Httpd.xotcl,v 1.8 2007/08/14 16:36:47 neumann Exp $ # # The XOTcl class Httpd implements an HTTP/1.0 and HTTP/1.1 server with # basic functionality. @@ -45,7 +45,7 @@ } proc ! string { - set f [open [::xotcl::tmpdir]log w+]; + set f [open /tmp/log w+]; puts $f "[clock format [clock seconds]] $string" close $f} Index: xotcl/library/comm/PCache.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/comm/PCache.xotcl (.../PCache.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/comm/PCache.xotcl (.../PCache.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,4 +1,4 @@ -# -*- Tcl -*- $Id: PCache.xotcl,v 1.7 2007/08/06 11:35:56 neumann Exp $ +# -*- Tcl -*- $Id: PCache.xotcl,v 1.8 2007/08/14 16:36:47 neumann Exp $ # Persistent Cache object, using gdbm # Configuration: @@ -10,7 +10,7 @@ # 2) If "CACHE_DIR" is not set, the global variable "homedir" # is checked, which is assumed to be the home directory # of the Cineast browser -# 3) As a last resource the tmp directory is used as the cache directory +# 3) As a last resource the /tmp directory is used as the cache directory # # Additionally, the cache directory can be specified after loading of this # file (before the first open) through the instance variable "dir" @@ -29,7 +29,7 @@ if {![info exists CACHE_DIR]} { if {![info exists homeDir]} { - set homeDir [::xotcl::tmpdir] + set homeDir /tmp } set CACHE_DIR $homeDir/cache2 } Index: xotcl/library/lib/changeXOTclVersion.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/lib/changeXOTclVersion.xotcl (.../changeXOTclVersion.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/lib/changeXOTclVersion.xotcl (.../changeXOTclVersion.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -6,7 +6,7 @@ # set XOTCL_MAJOR_VERSION 1 set XOTCL_MINOR_VERSION 5 -set XOTCL_RELEASE_LEVEL .4 +set XOTCL_RELEASE_LEVEL .3 # example settings: # 1.0 Index: xotcl/library/lib/trace.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/lib/trace.xotcl (.../trace.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/lib/trace.xotcl (.../trace.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,4 +1,4 @@ -# -*- Tcl -*- $Id: trace.xotcl,v 1.10 2007/08/06 11:35:56 neumann Exp $ +# -*- Tcl -*- $Id: trace.xotcl,v 1.11 2007/08/14 16:36:47 neumann Exp $ package provide xotcl::trace 0.91 package require XOTcl Index: xotcl/library/serialize/Serializer.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/serialize/Serializer.xotcl (.../Serializer.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/serialize/Serializer.xotcl (.../Serializer.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,5 +1,5 @@ -# $Id: Serializer.xotcl,v 1.16 2007/08/06 11:35:56 neumann Exp $ -package require XOTcl 1.5 +# $Id: Serializer.xotcl,v 1.17 2007/08/14 16:36:47 neumann Exp $ +package require XOTcl 1.3 package provide xotcl::serializer 1.0 namespace eval ::xotcl::serializer { @@ -15,7 +15,7 @@ authors { Gustaf Neumann, Gustaf.Neumann@wu-wien.ac.at } - date { $Date: 2007/08/06 11:35:56 $ } + date { $Date: 2007/08/14 16:36:47 $ } } @ Serializer proc all { @@ -181,23 +181,7 @@ return -$list } } - Serializer instproc collect-var-traces o { - my instvar traces - foreach v [$o info vars] { - set t [$o trace info variable $v] - if {$t ne ""} { - foreach ops $t { - foreach {op cmd} $ops break - # save traces in post_cmds - my append post_cmds [list $o trace add variable $v $op $cmd] "\n" - # remove trace from object - $o trace remove variable $v $op $cmd - } - } - } - } Serializer instproc Object-serialize o { - my collect-var-traces $o append cmd [list [$o info class] create [$o self]] # slots needs to be initialized when optimized, since # parametercmds are not serialized @@ -227,7 +211,7 @@ } foreach x {mixin invar} { set v [$o info $x] - if {$v ne ""} {my append post_cmds [list $o $x set $v] "\n"} + if {$v ne ""} {my append postcmd [list $o $x set $v] "\n"} } set v [$o info filter -guards] if {$v ne ""} {append cmd [my pcmd [list filter $v]] " \\\n"} @@ -255,7 +239,7 @@ foreach x {instmixin} { set v [$o info $x] if {$v ne "" && "::xotcl::Object" ne $v } { - my append post_cmds [list $o $x set $v] "\n" + my append postcmd [list $o $x set $v] "\n" #append cmd " " [my pcmd [list $x $v]] " \\\n" } } @@ -366,9 +350,7 @@ string trimright [my [my category $objectOrClass]-serialize $objectOrClass] "\\\n" } Serializer instproc serialize-objects {list all} { - my instvar post_cmds - set post_cmds "" - + my set postcmd "" my topoSort $list $all #foreach i [lsort [my array names level]] {my warn "$i: [my set level($i)]"} set result "" @@ -384,34 +366,23 @@ set namespace([namespace qualifiers $e]) 1 } - # Handling of variable traces: traces might require a - # different topological sort, which is hard to handle. - # Similar as with filters, we deactivate the variable - # traces during initialization. This happens by - # (1) replacing the XOTcl's trace method by a no-op - # (2) collecting variable traces through collect-var-traces - # (3) re-activating the traces after variable initialization - set exports "" - set pre_cmds "::xotcl::Object instproc trace args {}\n" - + set nsdefines "" # delete ::xotcl from the namespace list, if it exists... catch {unset namespace(::xotcl)} foreach ns [array name namespace] { if {![namespace exists $ns]} continue if {![my isobject $ns]} { - append pre_cmds "namespace eval $ns {}\n" + append nsdefines "namespace eval $ns {}\n" } elseif {$ns ne [namespace origin $ns] } { - append pre_cmds "namespace eval $ns {}\n" + append nsdefines "namespace eval $ns {}\n" } set exp [namespace eval $ns {namespace export}] if {$exp ne ""} { append exports "namespace eval $ns {namespace export $exp}" \n } } - - append post_cmds "::xotcl::alias ::xotcl::Object trace -objscope ::trace\n" - return $pre_cmds$result$post_cmds$exports + return $nsdefines$result[my set postcmd]$exports } Serializer instproc deepSerialize o { # assumes $o to be fully qualified Index: xotcl/library/store/XOTclGdbm/Makefile.in =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/store/XOTclGdbm/Makefile.in (.../Makefile.in) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/store/XOTclGdbm/Makefile.in (.../Makefile.in) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: Makefile.in,v 1.3 2007/08/06 11:35:56 neumann Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.4 2007/08/14 16:36:47 neumann Exp $ #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that @@ -200,12 +200,10 @@ install-libraries: libraries @mkdir -p $(DESTDIR)$(includedir) @echo "Installing header files in $(DESTDIR)$(includedir)" - @if test -n "$(PKG_HEADERS)" ; then \ - for i in "$(PKG_HEADERS)" ; do \ + @for i in $(PKG_HEADERS) ; do \ echo "Installing $(srcdir)/$$i" ; \ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ - done; \ - fi + done; #======================================================================== # Install documentation. Unix manpages should go in the $(mandir) Index: xotcl/library/store/XOTclGdbm/configure =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/store/XOTclGdbm/configure (.../configure) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/store/XOTclGdbm/configure (.../configure) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -6150,7 +6150,7 @@ # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS # and PKG_TCL_SOURCES. #----------------------------------------------------------------------- -if test ! "${with_gdbm}" = no; then +if test ! "${with_gdbm}" == no; then GDBM_INC_DIR="`echo $with_gdbm |cut -f1 -d,`" GDBM_LIB_DIR="`echo $with_gdbm |cut -f2 -d, -s`" fi @@ -10778,5 +10778,3 @@ - - Index: xotcl/library/store/XOTclGdbm/configure.in =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/store/XOTclGdbm/configure.in (.../configure.in) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/store/XOTclGdbm/configure.in (.../configure.in) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -3,7 +3,7 @@ dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.15 2007/08/06 11:35:56 neumann Exp $ +# RCS: @(#) $Id: configure.in,v 1.16 2007/08/14 16:36:47 neumann Exp $ #----------------------------------------------------------------------- # Sample configure.in for Tcl Extensions. The only places you should @@ -87,7 +87,7 @@ # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS # and PKG_TCL_SOURCES. #----------------------------------------------------------------------- -if test ! "${with_gdbm}" = no; then +if test ! "${with_gdbm}" == no; then GDBM_INC_DIR="`echo $with_gdbm |cut -f1 -d,`" GDBM_LIB_DIR="`echo $with_gdbm |cut -f2 -d, -s`" fi @@ -277,5 +277,3 @@ - - Index: xotcl/library/store/XOTclSdbm/Makefile =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/store/XOTclSdbm/Makefile (.../Makefile) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/store/XOTclSdbm/Makefile (.../Makefile) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: Makefile,v 1.27 2007/08/06 11:35:56 neumann Exp $ +# RCS: @(#) $Id: Makefile,v 1.28 2007/08/14 16:36:47 neumann Exp $ #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that Index: xotcl/library/store/XOTclSdbm/Makefile.in =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/store/XOTclSdbm/Makefile.in (.../Makefile.in) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/store/XOTclSdbm/Makefile.in (.../Makefile.in) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: Makefile.in,v 1.3 2007/08/06 11:35:56 neumann Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.4 2007/08/14 16:36:47 neumann Exp $ #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that @@ -200,12 +200,10 @@ install-libraries: libraries @mkdir -p $(DESTDIR)$(includedir) @echo "Installing header files in $(DESTDIR)$(includedir)" - @if test -n "$(PKG_HEADERS)" ; then \ - for i in "$(PKG_HEADERS)" ; do \ + @for i in $(PKG_HEADERS) ; do \ echo "Installing $(srcdir)/$$i" ; \ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ - done; \ - fi + done; #======================================================================== # Install documentation. Unix manpages should go in the $(mandir) Index: xotcl/library/store/XOTclSdbm/configure =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/store/XOTclSdbm/configure (.../configure) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/store/XOTclSdbm/configure (.../configure) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -10724,5 +10724,3 @@ - - Index: xotcl/library/store/XOTclSdbm/configure.in =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/store/XOTclSdbm/configure.in (.../configure.in) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/store/XOTclSdbm/configure.in (.../configure.in) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -3,7 +3,7 @@ dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.15 2007/08/06 11:35:56 neumann Exp $ +# RCS: @(#) $Id: configure.in,v 1.16 2007/08/14 16:36:47 neumann Exp $ #----------------------------------------------------------------------- # Sample configure.in for Tcl Extensions. The only places you should @@ -236,5 +236,3 @@ - - Index: xotcl/library/xml/TclExpat-1.1/Makefile =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/xml/TclExpat-1.1/Makefile (.../Makefile) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/xml/TclExpat-1.1/Makefile (.../Makefile) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: Makefile,v 1.27 2007/08/06 11:35:56 neumann Exp $ +# RCS: @(#) $Id: Makefile,v 1.28 2007/08/14 16:36:47 neumann Exp $ #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that Index: xotcl/library/xml/TclExpat-1.1/Makefile.in =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/xml/TclExpat-1.1/Makefile.in (.../Makefile.in) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/xml/TclExpat-1.1/Makefile.in (.../Makefile.in) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: Makefile.in,v 1.3 2007/08/06 11:35:56 neumann Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.4 2007/08/14 16:36:47 neumann Exp $ #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that @@ -200,12 +200,10 @@ install-libraries: libraries @mkdir -p $(DESTDIR)$(includedir) @echo "Installing header files in $(DESTDIR)$(includedir)" - @if test -n "$(PKG_HEADERS)" ; then \ - for i in "$(PKG_HEADERS)" ; do \ + @for i in $(PKG_HEADERS) ; do \ echo "Installing $(srcdir)/$$i" ; \ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ - done; \ - fi + done; #======================================================================== # Install documentation. Unix manpages should go in the $(mandir) Index: xotcl/library/xml/TclExpat-1.1/configure =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/xml/TclExpat-1.1/configure (.../configure) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/xml/TclExpat-1.1/configure (.../configure) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -6148,43 +6148,7 @@ # and PKG_TCL_SOURCES. #----------------------------------------------------------------------- -if test "${TEA_PLATFORM}" = "windows" ; then - vars="xmltok.c win32filemap.c xmlrole.c xmlwf.c codepage.c xmlparse.c hashtable.c tclexpat.c" - for i in $vars; do - case $i in - \$*) - # allow $-var names - PKG_SOURCES="$PKG_SOURCES $i" - PKG_OBJECTS="$PKG_OBJECTS $i" - ;; - *) - # check for existence - allows for generic/win/unix VPATH - if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ - -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ - ; then - { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5 -echo "$as_me: error: could not find source file '$i'" >&2;} - { (exit 1); exit 1; }; } - fi - PKG_SOURCES="$PKG_SOURCES $i" - # this assumes it is in a VPATH dir - i=`basename $i` - # handle user calling this before or after TEA_SETUP_COMPILER - if test x"${OBJEXT}" != x ; then - j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}" - else - j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}" - fi - PKG_OBJECTS="$PKG_OBJECTS $j" - ;; - esac - done - - - -else - vars="xmltok.c unixfilemap.c xmlrole.c xmlwf.c codepage.c xmlparse.c hashtable.c tclexpat.c" for i in $vars; do case $i in @@ -6218,9 +6182,7 @@ -fi - vars="" for i in $vars; do # check for existence, be strict because it is installed @@ -10762,5 +10724,3 @@ - - Index: xotcl/library/xml/TclExpat-1.1/configure.in =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/library/xml/TclExpat-1.1/configure.in (.../configure.in) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/library/xml/TclExpat-1.1/configure.in (.../configure.in) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -3,7 +3,7 @@ dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.15 2007/08/06 11:35:56 neumann Exp $ +# RCS: @(#) $Id: configure.in,v 1.16 2007/08/14 16:36:47 neumann Exp $ #----------------------------------------------------------------------- # Sample configure.in for Tcl Extensions. The only places you should @@ -90,12 +90,7 @@ # and PKG_TCL_SOURCES. #----------------------------------------------------------------------- -if test "${TEA_PLATFORM}" = "windows" ; then - TEA_ADD_SOURCES([xmltok.c win32filemap.c xmlrole.c xmlwf.c codepage.c xmlparse.c hashtable.c tclexpat.c]) -else - TEA_ADD_SOURCES([xmltok.c unixfilemap.c xmlrole.c xmlwf.c codepage.c xmlparse.c hashtable.c tclexpat.c]) -fi - +TEA_ADD_SOURCES([xmltok.c unixfilemap.c xmlrole.c xmlwf.c codepage.c xmlparse.c hashtable.c tclexpat.c]) TEA_ADD_HEADERS([]) TEA_ADD_INCLUDES([-I${with_xotcl}/generic ${XOTCL_BUILD_INCLUDE_SPEC}]) TEA_ADD_LIBS([$XOTCL_BUILD_STUB_LIB_SPEC]) @@ -241,5 +236,3 @@ - - Index: xotcl/tests/forwardtest.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/tests/forwardtest.xotcl (.../forwardtest.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/tests/forwardtest.xotcl (.../forwardtest.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,4 +1,4 @@ -# $Id: forwardtest.xotcl,v 1.10 2007/08/06 11:35:56 neumann Exp $ +# $Id: forwardtest.xotcl,v 1.11 2007/08/14 16:36:47 neumann Exp $ package require XOTcl namespace import -force xotcl::* package require xotcl::test Index: xotcl/tests/slottest.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/tests/slottest.xotcl (.../slottest.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/tests/slottest.xotcl (.../slottest.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,4 +1,4 @@ -# $Id: slottest.xotcl,v 1.3 2007/08/06 11:35:56 neumann Exp $ +# $Id: slottest.xotcl,v 1.4 2007/08/14 16:36:47 neumann Exp $ package require XOTcl namespace import -force xotcl::* package require xotcl::test @@ -424,12 +424,12 @@ set ::hu 0 Class C -slots { - Attribute x -initcmd {incr ::hu; set x 101} + Attribute x -initcmd {incr ::hu; set _ 101} } C c1 ? {c1 info vars} "" ? {c1 set x} 101 -? {c1 info vars} "x" +? {c1 info vars} x ? {set ::hu 1} 1 Index: xotcl/tests/speedtest.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/tests/speedtest.xotcl (.../speedtest.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/tests/speedtest.xotcl (.../speedtest.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,5 +1,5 @@ #memory trace on -# $Id: speedtest.xotcl,v 1.8 2007/08/06 11:35:56 neumann Exp $ +# $Id: speedtest.xotcl,v 1.9 2007/08/14 16:36:47 neumann Exp $ package require XOTcl namespace import -force xotcl::* lappend auto_path [file dirname [info script]]/.. Index: xotcl/tests/testo.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/tests/testo.xotcl (.../testo.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/tests/testo.xotcl (.../testo.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,4 +1,4 @@ -# $Id: testo.xotcl,v 1.7 2007/08/06 11:35:56 neumann Exp $ +# $Id: testo.xotcl,v 1.8 2007/08/14 16:36:47 neumann Exp $ # # Copyright 1993 Massachusetts Institute of Technology # @@ -446,11 +446,12 @@ # # set up some variables # + $obj set scalar 0 $obj set array() {} - $obj unset array() + ${obj} unset array() $obj set unset.$n {} - + # # mess with them recursively # @@ -468,7 +469,8 @@ my recurse $n } } - + + $obj recurse $n # @@ -478,15 +480,15 @@ if {[$obj set scalar] != $n} then { error "FAILED [self] - scalar" } - $obj unset scalar for {set i $n} {$i > 0} {incr i -1} { if {[$obj set array($i)] != $i} then { error "FAILED [self] - array" } - } + } $obj unset array + if {[$obj info vars "unset.0"] eq ""} then { error "FAILED [self] - unset: [$obj info vars]" } @@ -495,6 +497,7 @@ # # trace variables # + Variables avar2 avar2 proc trace {var ops} { Index: xotcl/tests/testx.xotcl =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/tests/testx.xotcl (.../testx.xotcl) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/tests/testx.xotcl (.../testx.xotcl) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,4 +1,4 @@ -#$Id: testx.xotcl,v 1.32 2007/08/06 11:35:56 neumann Exp $ +#$Id: testx.xotcl,v 1.33 2007/08/14 16:36:47 neumann Exp $ package require XOTcl namespace import -force xotcl::* Index: xotcl/unix/pkgIndex.unix =================================================================== diff -u -r99a7a21854051cd691029b15ef8877aa9e86cf44 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/unix/pkgIndex.unix (.../pkgIndex.unix) (revision 99a7a21854051cd691029b15ef8877aa9e86cf44) +++ xotcl/unix/pkgIndex.unix (.../pkgIndex.unix) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,4 +1,4 @@ - package ifneeded XOTcl 1.5.4 [list load \ - [file join $dir libxotcl1.5.4.dylib] XOTcl] + package ifneeded XOTcl 1.5.3 [list load \ + [file join $dir libxotcl1.5.3.dylib] XOTcl] Index: xotcl/unix/xotcl.spec =================================================================== diff -u -r7eebad4e9179bac6fac6af582851da851ff8def6 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/unix/xotcl.spec (.../xotcl.spec) (revision 7eebad4e9179bac6fac6af582851da851ff8def6) +++ xotcl/unix/xotcl.spec (.../xotcl.spec) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -1,10 +1,10 @@ Summary: Object Oriented Extension for Tcl Name: xotcl -Version: 1.5.4 +Version: 1.5.3 Release: 0 License: bsd style open source Group: Development/Languages -Source: http://www.xotcl.org/xotcl-1.5.4.tar.gz +Source: http://www.xotcl.org/xotcl-1.5.3.tar.gz URL: http://www.xotcl.org Packager: Gustaf.Neumann@wu-wien.ac.at Distribution: Fedorea Core 3 @@ -23,7 +23,7 @@ consult http://www.xotcl.org %prep -%setup -q -n xotcl-1.5.4 +%setup -q -n xotcl-1.5.3 %build @@ -35,16 +35,16 @@ %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install -rm -f $RPM_BUILD_ROOT/usr/lib/libxotcl1.5.4.so -ln -s xotcl1.5.4/libxotcl1.5.4.so $RPM_BUILD_ROOT/usr/lib +rm -f $RPM_BUILD_ROOT/usr/lib/libxotcl1.5.3.so +ln -s xotcl1.5.3/libxotcl1.5.3.so $RPM_BUILD_ROOT/usr/lib %files %defattr(-, root, root) %doc doc %_bindir/xotclsh %_bindir/xowish -%_prefix/lib/xotcl1.5.4 -%_prefix/lib/libxotcl1.5.4.so +%_prefix/lib/xotcl1.5.3 +%_prefix/lib/libxotcl1.5.3.so %_prefix/lib/xotclexpat* %_prefix/lib/xotclgdbm* %_prefix/lib/xotclsdbm* Index: xotcl/xotclConfig.sh =================================================================== diff -u -r7eebad4e9179bac6fac6af582851da851ff8def6 -rf9bb662bd07a30d00a33e75ab3354bb9f8463999 --- xotcl/xotclConfig.sh (.../xotclConfig.sh) (revision 7eebad4e9179bac6fac6af582851da851ff8def6) +++ xotcl/xotclConfig.sh (.../xotclConfig.sh) (revision f9bb662bd07a30d00a33e75ab3354bb9f8463999) @@ -15,7 +15,7 @@ XOTCL_VERSION='1.5' XOTCL_MAJOR_VERSION='1' XOTCL_MINOR_VERSION='5' -XOTCL_RELEASE_LEVEL='.4' +XOTCL_RELEASE_LEVEL='.3' # String to pass to compiles to pick up includes during build # (i.e., assuming nothing has been installed) @@ -24,34 +24,34 @@ # String to pass to compiles to pick up the XOTcl includes from their # installed directory. -XOTCL_INCLUDE_DIR="/usr/local/include/xotcl1.5.4" +XOTCL_INCLUDE_DIR="/usr/local/include/xotcl1.5.3" XOTCL_INCLUDE_SPEC="-I$XOTCL_INCLUDE_DIR" # The name of the XOTcl library (may be either a .a file or a shared library): -XOTCL_LIB_FILE=libxotcl1.5.4.dylib +XOTCL_LIB_FILE=libxotcl1.5.3.dylib # String to pass to linker to pick up the XOTcl library from its # build directory. -XOTCL_BUILD_LIB_SPEC='-L/Users/neumann/src/xotcl-1.5.4 -lxotcl1.5.4' +XOTCL_BUILD_LIB_SPEC='-L/Users/neumann/src/xotcl-1.5.3 -lxotcl1.5.3' # String to pass to linker to pick up the XOTcl library from its # installed directory. -XOTCL_LIB_SPEC='-L/usr/local/lib/xotcl1.5.4 -lxotcl1.5.4' +XOTCL_LIB_SPEC='-L/usr/local/lib/xotcl1.5.3 -lxotcl1.5.3' # The name of the XOTcl stub library (a .a file): -# XOTCL_STUB_LIB_FILE=libxotclstub1.5.4.a +# XOTCL_STUB_LIB_FILE=libxotclstub1.5.3.a # String to pass to linker to pick up the XOTcl stub library from its # build directory. -XOTCL_BUILD_STUB_LIB_SPEC='-L/Users/neumann/src/xotcl-1.5.4 -lxotclstub1.5.4' +XOTCL_BUILD_STUB_LIB_SPEC='-L/Users/neumann/src/xotcl-1.5.3 -lxotclstub1.5.3' # String to pass to linker to pick up the XOTcl stub library from its # installed directory. -XOTCL_STUB_LIB_SPEC='-L/usr/local/lib/xotcl1.5.4 -lxotclstub1.5.4' +XOTCL_STUB_LIB_SPEC='-L/usr/local/lib/xotcl1.5.3 -lxotclstub1.5.3' # Name of the xotcl stub library with full path in build and install directory -XOTCL_BUILD_STUB_LIB_PATH='/Users/neumann/src/xotcl-1.5.4/libxotclstub1.5.4.a' -XOTCL_STUB_LIB_PATH='/usr/local/lib/xotcl1.5.4/libxotclstub1.5.4.a' +XOTCL_BUILD_STUB_LIB_PATH='/Users/neumann/src/xotcl-1.5.3/libxotclstub1.5.3.a' +XOTCL_STUB_LIB_PATH='/usr/local/lib/xotcl1.5.3/libxotclstub1.5.3.a' # Location of the top-level source directories from which XOTcl # was built. This is the directory that contains generic, unix, etc. @@ -61,9 +61,9 @@ XOTCL_SRC_DIR='.' # shared and unshared library suffix -XOTCL_SHARED_LIB_SUFFIX=1.5.4.dylib -XOTCL_UNSHARED_LIB_SUFFIX=1.5.4.a +XOTCL_SHARED_LIB_SUFFIX=1.5.3.dylib +XOTCL_UNSHARED_LIB_SUFFIX=1.5.3.a # the shell in whose installation dirs the xotcl package is installed -XOTCL_COMPATIBLE_TCLSH=/usr/local/bin/tclsh8.5 +XOTCL_COMPATIBLE_TCLSH=/usr/local/bin/tclsh8.4