diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-01-16 10:48:16 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-01-16 10:48:16 (GMT) |
commit | 6343dec19ea154b946544b6b419e0eec0e9ad006 (patch) | |
tree | 4a3258ed6a96617b378d215dbb38c1c5deab4325 | |
parent | fff9b53f89966d7809b934c0edd0fa21c9019385 (diff) | |
parent | 096fcb63ad03e22727db52eba9d7926194f673ae (diff) | |
download | tcl-6343dec19ea154b946544b6b419e0eec0e9ad006.zip tcl-6343dec19ea154b946544b6b419e0eec0e9ad006.tar.gz tcl-6343dec19ea154b946544b6b419e0eec0e9ad006.tar.bz2 |
Merge core-8-4-branch.
Add Tcl_GetStartupScript/Tcl_SetStartupScript stub entries as well.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | generic/tcl.decls | 6 | ||||
-rw-r--r-- | generic/tcl.h | 11 | ||||
-rw-r--r-- | generic/tclBasic.c | 2 | ||||
-rw-r--r-- | generic/tclDecls.h | 36 | ||||
-rw-r--r-- | generic/tclInt.decls | 6 | ||||
-rw-r--r-- | generic/tclIntDecls.h | 24 | ||||
-rw-r--r-- | generic/tclStubInit.c | 22 | ||||
-rw-r--r-- | win/Makefile.in | 7 |
9 files changed, 92 insertions, 30 deletions
@@ -1,3 +1,11 @@ +2013-01-16 Jan Nijtmans <nijtmans@users.sf.net> + + * Makefile.in: Enable win32 build with -DTCL_NO_DEPRECATED, just + * generic/tcl.h: as the UNIX build. Define Tcl_EvalObj and + * generic/tclDecls.h: Tcl_GlobalEvalObj as macros, even when + * generic/tclBasic.c: TCL_NO_DEPRECATED is defined, so Tk + can benefit from it too. + 2013-01-08 Jan Nijtmans <nijtmans@users.sf.net> * win/tclWinFile.c: [Bug 3092089]: [file normalize] can remove path diff --git a/generic/tcl.decls b/generic/tcl.decls index 991a6de..c1bc78a 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -1857,6 +1857,12 @@ declare 606 { declare 609 { void TclBackgroundException(Tcl_Interp *interp, int code) } +declare 622 { + void TclSetStartupScript(Tcl_Obj *path, const char *encoding) +} +declare 623 { + Tcl_Obj *TclGetStartupScript(const char **encodingPtr) +} declare 630 { void TclUnusedStubEntry(void) } diff --git a/generic/tcl.h b/generic/tcl.h index 9dd6ff0..5f47734 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -2278,17 +2278,6 @@ typedef unsigned short Tcl_UniChar; /* - * Deprecated Tcl procedures: - */ -#ifndef TCL_NO_DEPRECATED -# define Tcl_EvalObj(interp,objPtr) \ - Tcl_EvalObjEx((interp),(objPtr),0) -# define Tcl_GlobalEvalObj(interp,objPtr) \ - Tcl_EvalObjEx((interp),(objPtr),TCL_EVAL_GLOBAL) -#endif - - -/* * These function have been renamed. The old names are deprecated, but we * define these macros for backwards compatibilty. */ diff --git a/generic/tclBasic.c b/generic/tclBasic.c index bd4ad5d..134deac 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -4923,7 +4923,6 @@ Tcl_Eval(interp, string) *---------------------------------------------------------------------- */ -#undef Tcl_EvalObj int Tcl_EvalObj(interp, objPtr) Tcl_Interp * interp; @@ -4932,7 +4931,6 @@ Tcl_EvalObj(interp, objPtr) return Tcl_EvalObjEx(interp, objPtr, 0); } -#undef Tcl_GlobalEvalObj int Tcl_GlobalEvalObj(interp, objPtr) Tcl_Interp * interp; diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 483b471..74d3631 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -1714,8 +1714,12 @@ EXTERN void TclBackgroundException _ANSI_ARGS_(( /* Slot 619 is reserved */ /* Slot 620 is reserved */ /* Slot 621 is reserved */ -/* Slot 622 is reserved */ -/* Slot 623 is reserved */ +/* 622 */ +EXTERN void TclSetStartupScript _ANSI_ARGS_((Tcl_Obj *path, + CONST char *encoding)); +/* 623 */ +EXTERN Tcl_Obj * TclGetStartupScript _ANSI_ARGS_(( + CONST char **encodingPtr)); /* Slot 624 is reserved */ /* Slot 625 is reserved */ /* Slot 626 is reserved */ @@ -2381,8 +2385,8 @@ typedef struct TclStubs { VOID *reserved619; VOID *reserved620; VOID *reserved621; - VOID *reserved622; - VOID *reserved623; + void (*tclSetStartupScript) _ANSI_ARGS_((Tcl_Obj *path, CONST char *encoding)); /* 622 */ + Tcl_Obj * (*tclGetStartupScript) _ANSI_ARGS_((CONST char **encodingPtr)); /* 623 */ VOID *reserved624; VOID *reserved625; VOID *reserved626; @@ -4582,8 +4586,14 @@ extern TclStubs *tclStubsPtr; /* Slot 619 is reserved */ /* Slot 620 is reserved */ /* Slot 621 is reserved */ -/* Slot 622 is reserved */ -/* Slot 623 is reserved */ +#ifndef TclSetStartupScript +#define TclSetStartupScript \ + (tclStubsPtr->tclSetStartupScript) /* 622 */ +#endif +#ifndef TclGetStartupScript +#define TclGetStartupScript \ + (tclStubsPtr->tclGetStartupScript) /* 623 */ +#endif /* Slot 624 is reserved */ /* Slot 625 is reserved */ /* Slot 626 is reserved */ @@ -4603,6 +4613,8 @@ extern TclStubs *tclStubsPtr; #undef TclBackgroundException #undef TclGetErrorLine #undef TclSetErrorLine +#undef TclGetStartupScript +#undef TclSetStartupScript #undef Tcl_CreateNamespace #undef Tcl_DeleteNamespace @@ -4618,5 +4630,17 @@ extern TclStubs *tclStubsPtr; #undef Tcl_GetCommandFullName #undef TclUnusedStubEntry +/* + * Deprecated Tcl procedures: + */ +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) +# undef Tcl_EvalObj +# define Tcl_EvalObj(interp,objPtr) \ + Tcl_EvalObjEx((interp),(objPtr),0) +# undef Tcl_GlobalEvalObj +# define Tcl_GlobalEvalObj(interp,objPtr) \ + Tcl_EvalObjEx((interp),(objPtr),TCL_EVAL_GLOBAL) +#endif + #endif /* _TCLDECLS */ diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 967b7cd..5d54e4e 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -682,6 +682,12 @@ declare 173 { int TclUniCharMatch(const Tcl_UniChar *string, int strLen, const Tcl_UniChar *pattern, int ptnLen, int nocase) } +declare 178 { + void TclSetStartupScript(Tcl_Obj *pathPtr, const char *encodingName) +} +declare 179 { + Tcl_Obj *TclGetStartupScript(const char **encodingNamePtr) +} # TclpGmtime and TclpLocaltime promoted to the generic interface from unix diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 317dd8c..14879b5 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -480,8 +480,12 @@ EXTERN int TclUniCharMatch _ANSI_ARGS_(( /* Slot 175 is reserved */ /* Slot 176 is reserved */ /* Slot 177 is reserved */ -/* Slot 178 is reserved */ -/* Slot 179 is reserved */ +/* 178 */ +EXTERN void TclSetStartupScript _ANSI_ARGS_((Tcl_Obj *pathPtr, + CONST char *encodingName)); +/* 179 */ +EXTERN Tcl_Obj * TclGetStartupScript _ANSI_ARGS_(( + CONST char **encodingNamePtr)); /* Slot 180 is reserved */ /* Slot 181 is reserved */ /* 182 */ @@ -741,8 +745,8 @@ typedef struct TclIntStubs { VOID *reserved175; VOID *reserved176; VOID *reserved177; - VOID *reserved178; - VOID *reserved179; + void (*tclSetStartupScript) _ANSI_ARGS_((Tcl_Obj *pathPtr, CONST char *encodingName)); /* 178 */ + Tcl_Obj * (*tclGetStartupScript) _ANSI_ARGS_((CONST char **encodingNamePtr)); /* 179 */ VOID *reserved180; VOID *reserved181; struct tm * (*tclpLocaltime) _ANSI_ARGS_((TclpTime_t_CONST clock)); /* 182 */ @@ -1406,8 +1410,14 @@ extern TclIntStubs *tclIntStubsPtr; /* Slot 175 is reserved */ /* Slot 176 is reserved */ /* Slot 177 is reserved */ -/* Slot 178 is reserved */ -/* Slot 179 is reserved */ +#ifndef TclSetStartupScript +#define TclSetStartupScript \ + (tclIntStubsPtr->tclSetStartupScript) /* 178 */ +#endif +#ifndef TclGetStartupScript +#define TclGetStartupScript \ + (tclIntStubsPtr->tclGetStartupScript) /* 179 */ +#endif /* Slot 180 is reserved */ /* Slot 181 is reserved */ #ifndef TclpLocaltime @@ -1505,5 +1515,7 @@ extern TclIntStubs *tclIntStubsPtr; #endif #undef TclUnusedStubEntry #undef TclBackgroundException +#undef TclGetStartupScript +#undef TclSetStartupScript #endif /* _TCLINTDECLS */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index cb73ebf..feae0e2 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -98,6 +98,20 @@ static void TclSetErrorLine(interp, lineNum) { interp->errorLine = lineNum; } +#define TclSetStartupScript setStartupScript +static void TclSetStartupScript(path, encoding) + Tcl_Obj *path; + CONST char *encoding; +{ + TclSetStartupScriptPath(path); +} +#define TclGetStartupScript getStartupScript +static Tcl_Obj *TclGetStartupScript(encodingPtr) + CONST char **encodingPtr; +{ + if (encodingPtr) *encodingPtr = NULL; + return TclGetStartupScriptPath(); +} #ifdef __WIN32__ # define TclUnixWaitForFile 0 @@ -413,8 +427,8 @@ TclIntStubs tclIntStubs = { NULL, /* 175 */ NULL, /* 176 */ NULL, /* 177 */ - NULL, /* 178 */ - NULL, /* 179 */ + TclSetStartupScript, /* 178 */ + TclGetStartupScript, /* 179 */ NULL, /* 180 */ NULL, /* 181 */ TclpLocaltime, /* 182 */ @@ -1256,8 +1270,8 @@ TclStubs tclStubs = { NULL, /* 619 */ NULL, /* 620 */ NULL, /* 621 */ - NULL, /* 622 */ - NULL, /* 623 */ + TclSetStartupScript, /* 622 */ + TclGetStartupScript, /* 623 */ NULL, /* 624 */ NULL, /* 625 */ NULL, /* 626 */ diff --git a/win/Makefile.in b/win/Makefile.in index af4ca68..b9ae5ad 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -129,6 +129,11 @@ SHARED_LIBRARIES = $(TCL_DLL_FILE) $(TCL_STUB_LIB_FILE) \ $(DDE_DLL_FILE) $(REG_DLL_FILE) $(PIPE_DLL_FILE) STATIC_LIBRARIES = $(TCL_LIB_FILE) $(REG_LIB_FILE) $(DDE_LIB_FILE) +# To compile without backward compatibility and deprecated code +# uncomment the following +NO_DEPRECATED_FLAGS = +#NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED + # TCL_EXE is the name of a tclsh executable that is available *BEFORE* # running make for the first time. Certain build targets (make genstubs) # need it to be available on the PATH. This executable should *NOT* be @@ -184,7 +189,7 @@ COPY = cp CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${TCL_SHLIB_CFLAGS} \ -I"${GENERIC_DIR_NATIVE}" -I"${WIN_DIR_NATIVE}" ${AC_FLAGS} \ -${COMPILE_DEBUG_FLAGS} +${COMPILE_DEBUG_FLAGS} ${NO_DEPRECATED_FLAGS} CC_OBJNAME = @CC_OBJNAME@ CC_EXENAME = @CC_EXENAME@ |