diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-01-25 10:26:22 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-01-25 10:26:22 (GMT) |
commit | f464b7f127e31aa1590da57c7c917c14126630ac (patch) | |
tree | 5ae55ead64baf1e674ba4574ab594264a47db612 /generic | |
parent | 0d127f7a8a466193db2eefa8be15edab22decaf6 (diff) | |
download | tcl-f464b7f127e31aa1590da57c7c917c14126630ac.zip tcl-f464b7f127e31aa1590da57c7c917c14126630ac.tar.gz tcl-f464b7f127e31aa1590da57c7c917c14126630ac.tar.bz2 |
Fix [f4b0cb2080] by only accepting new syntax when TCL_NO_DEPRECATED is defined
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclDecls.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 700f3e2..0803448 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -4138,28 +4138,32 @@ extern const TclStubs *tclStubsPtr; # endif #endif +#undef Tcl_GetUnicode +#define Tcl_GetUnicode(objPtr) \ + Tcl_GetUnicodeFromObj(objPtr, (int *)NULL) +#ifdef TCL_NO_DEPRECATED #undef Tcl_GetStringFromObj #undef Tcl_GetUnicodeFromObj #undef Tcl_GetByteArrayFromObj -#undef Tcl_GetUnicode +#endif #if defined(USE_TCL_STUBS) +#ifdef TCL_NO_DEPRECATED #define Tcl_GetStringFromObj(objPtr, sizePtr) \ (sizeof(*sizePtr) <= sizeof(int) ? tclStubsPtr->tcl_GetStringFromObj(objPtr, (int *)sizePtr) : tclStubsPtr->tclGetStringFromObj(objPtr, (size_t *)sizePtr)) #define Tcl_GetByteArrayFromObj(objPtr, sizePtr) \ (sizeof(*sizePtr) <= sizeof(int) ? tclStubsPtr->tcl_GetByteArrayFromObj(objPtr, (int *)sizePtr) : tclStubsPtr->tclGetByteArrayFromObj(objPtr, (size_t *)sizePtr)) #define Tcl_GetUnicodeFromObj(objPtr, sizePtr) \ (sizeof(*sizePtr) <= sizeof(int) ? tclStubsPtr->tcl_GetUnicodeFromObj(objPtr, (int *)sizePtr) : tclStubsPtr->tclGetUnicodeFromObj(objPtr, (size_t *)sizePtr)) -#define Tcl_GetUnicode(objPtr) \ - tclStubsPtr->tcl_GetUnicodeFromObj(objPtr, NULL) +#endif #else +#ifdef TCL_NO_DEPRECATED #define Tcl_GetStringFromObj(objPtr, sizePtr) \ (sizeof(*sizePtr) <= sizeof(int) ? (Tcl_GetStringFromObj)(objPtr, (int *)sizePtr) : (TclGetStringFromObj)(objPtr, (size_t *)sizePtr)) #define Tcl_GetByteArrayFromObj(objPtr, sizePtr) \ (sizeof(*sizePtr) <= sizeof(int) ? (Tcl_GetByteArrayFromObj)(objPtr, (int *)sizePtr) : TclGetByteArrayFromObj(objPtr, (size_t *)sizePtr)) #define Tcl_GetUnicodeFromObj(objPtr, sizePtr) \ (sizeof(*sizePtr) <= sizeof(int) ? (Tcl_GetUnicodeFromObj)(objPtr, (int *)sizePtr) : TclGetUnicodeFromObj(objPtr, (size_t *)sizePtr)) -#define Tcl_GetUnicode(objPtr) \ - (Tcl_GetUnicodeFromObj)(objPtr, NULL) +#endif #endif #undef Tcl_NewLongObj |