diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-01-20 14:35:25 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-01-20 14:35:25 (GMT) |
commit | a3906f4953e88e646a9034649dbeb6db3624c99b (patch) | |
tree | 9b5ee0caab2b0e84b21d97723cd416416979a1db /generic | |
parent | 12d3b15f307754ea15cceabd761e0f60346e9cc4 (diff) | |
download | tcl-a3906f4953e88e646a9034649dbeb6db3624c99b.zip tcl-a3906f4953e88e646a9034649dbeb6db3624c99b.tar.gz tcl-a3906f4953e88e646a9034649dbeb6db3624c99b.tar.bz2 |
Don't deprecate Tcl_NewUnicodeObj/Tcl_SetUnicodeObj/Tcl_GetUnicodeFromObj, since that's not according to TIP #542. (Those are only deprecated when using TCL_UTF_MAX=4, not in the general case)
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tcl.decls | 6 | ||||
-rw-r--r-- | generic/tclDecls.h | 15 | ||||
-rw-r--r-- | generic/tclTestObj.c | 8 |
3 files changed, 17 insertions, 12 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls index 0587088..5516f89 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -1337,10 +1337,10 @@ declare 376 { declare 377 { void Tcl_RegExpGetInfo(Tcl_RegExp regexp, Tcl_RegExpInfo *infoPtr) } -declare 378 {deprecated {Use Tcl_UniCharToUtfDString}} { +declare 378 { Tcl_Obj *Tcl_NewUnicodeObj(const Tcl_UniChar *unicode, int numChars) } -declare 379 {deprecated {Use Tcl_UniCharToUtfDString}} { +declare 379 { void Tcl_SetUnicodeObj(Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int numChars) } @@ -1540,7 +1540,7 @@ declare 433 { } # introduced in 8.4a3 -declare 434 {deprecated {Use Tcl_UtfToUniCharDString}} { +declare 434 { Tcl_UniChar *Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr, int *lengthPtr) } diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 75b9c01..b2b7767 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -1143,12 +1143,10 @@ EXTERN int Tcl_RegExpExecObj(Tcl_Interp *interp, EXTERN void Tcl_RegExpGetInfo(Tcl_RegExp regexp, Tcl_RegExpInfo *infoPtr); /* 378 */ -TCL_DEPRECATED("Use Tcl_UniCharToUtfDString") -Tcl_Obj * Tcl_NewUnicodeObj(const Tcl_UniChar *unicode, +EXTERN Tcl_Obj * Tcl_NewUnicodeObj(const Tcl_UniChar *unicode, int numChars); /* 379 */ -TCL_DEPRECATED("Use Tcl_UniCharToUtfDString") -void Tcl_SetUnicodeObj(Tcl_Obj *objPtr, +EXTERN void Tcl_SetUnicodeObj(Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int numChars); /* 380 */ EXTERN int Tcl_GetCharLength(Tcl_Obj *objPtr); @@ -1304,8 +1302,7 @@ EXTERN int Tcl_AttemptSetObjLength(Tcl_Obj *objPtr, int length); /* 433 */ EXTERN Tcl_ThreadId Tcl_GetChannelThread(Tcl_Channel channel); /* 434 */ -TCL_DEPRECATED("Use Tcl_UtfToUniCharDString") -Tcl_UniChar * Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr, +EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr, int *lengthPtr); /* 435 */ TCL_DEPRECATED("") @@ -2334,8 +2331,8 @@ typedef struct TclStubs { int (*tcl_UniCharIsPunct) (int ch); /* 375 */ int (*tcl_RegExpExecObj) (Tcl_Interp *interp, Tcl_RegExp regexp, Tcl_Obj *textObj, int offset, int nmatches, int flags); /* 376 */ void (*tcl_RegExpGetInfo) (Tcl_RegExp regexp, Tcl_RegExpInfo *infoPtr); /* 377 */ - TCL_DEPRECATED_API("Use Tcl_UniCharToUtfDString") Tcl_Obj * (*tcl_NewUnicodeObj) (const Tcl_UniChar *unicode, int numChars); /* 378 */ - TCL_DEPRECATED_API("Use Tcl_UniCharToUtfDString") void (*tcl_SetUnicodeObj) (Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int numChars); /* 379 */ + Tcl_Obj * (*tcl_NewUnicodeObj) (const Tcl_UniChar *unicode, int numChars); /* 378 */ + void (*tcl_SetUnicodeObj) (Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int numChars); /* 379 */ int (*tcl_GetCharLength) (Tcl_Obj *objPtr); /* 380 */ int (*tcl_GetUniChar) (Tcl_Obj *objPtr, int index); /* 381 */ TCL_DEPRECATED_API("No longer in use, changed to macro") Tcl_UniChar * (*tcl_GetUnicode) (Tcl_Obj *objPtr); /* 382 */ @@ -2390,7 +2387,7 @@ typedef struct TclStubs { char * (*tcl_AttemptDbCkrealloc) (char *ptr, unsigned int size, const char *file, int line); /* 431 */ int (*tcl_AttemptSetObjLength) (Tcl_Obj *objPtr, int length); /* 432 */ Tcl_ThreadId (*tcl_GetChannelThread) (Tcl_Channel channel); /* 433 */ - TCL_DEPRECATED_API("Use Tcl_UtfToUniCharDString") Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj *objPtr, int *lengthPtr); /* 434 */ + Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj *objPtr, int *lengthPtr); /* 434 */ TCL_DEPRECATED_API("") int (*tcl_GetMathFuncInfo) (Tcl_Interp *interp, const char *name, int *numArgsPtr, Tcl_ValueType **argTypesPtr, Tcl_MathProc **procPtr, ClientData *clientDataPtr); /* 435 */ TCL_DEPRECATED_API("") Tcl_Obj * (*tcl_ListMathFuncs) (Tcl_Interp *interp, const char *pattern); /* 436 */ Tcl_Obj * (*tcl_SubstObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 437 */ diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index e616433..ced860e 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -25,6 +25,14 @@ #endif #include "tclStringRep.h" +#ifdef __GNUC__ +/* + * The rest of this file shouldn't warn about deprecated functions; they're + * there because we intend them to be so and know that this file is OK to + * touch those fields. + */ +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif /* * Forward declarations for functions defined later in this file: |