From 689f5653f9349eb55b176a83f0daf2762a353a2b Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 7 Apr 2018 16:55:53 +0000 Subject: Correct out-of-date documentation for [string is]. --- doc/string.n | 8 +++----- generic/tclCmdMZ.c | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/doc/string.n b/doc/string.n index 7e427ab..d4e2833 100644 --- a/doc/string.n +++ b/doc/string.n @@ -136,9 +136,7 @@ Any Unicode control character. Any Unicode digit character. Note that this includes characters outside of the [0\-9] range. .IP \fBdouble\fR 12 -Any of the valid forms for a double in Tcl, with optional surrounding -whitespace. In case of under/overflow in the value, 0 is returned and -the \fIvarname\fR will contain \-1. +Any of the forms allowed to \fBTcl_GetDoubleFromObj\fR. .IP \fBfalse\fR 12 Any of the forms allowed to \fBTcl_GetBoolean\fR where the value is false. @@ -146,7 +144,7 @@ false. Any Unicode printing character, except space. .IP \fBinteger\fR 12 Any of the valid string formats for a 32-bit integer value in Tcl, -with optional surrounding whitespace. In case of under/overflow in +with optional surrounding whitespace. In case of overflow in the value, 0 is returned and the \fIvarname\fR will contain \-1. .IP \fBlist\fR 12 Any proper list structure, with optional surrounding whitespace. In @@ -171,7 +169,7 @@ Any upper case alphabet character in the Unicode character set. .VS 8.5 .IP \fBwideinteger\fR 12 Any of the valid forms for a wide integer in Tcl, with optional -surrounding whitespace. In case of under/overflow in the value, 0 is +surrounding whitespace. In case of overflow in the value, 0 is returned and the \fIvarname\fR will contain \-1. .VE 8.5 .IP \fBwordchar\fR 12 diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index de953aa..db4e57b 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -1515,7 +1515,6 @@ StringIsCmd( chcomp = Tcl_UniCharIsDigit; break; case STR_IS_DOUBLE: { - /* TODO */ if ((objPtr->typePtr == &tclDoubleType) || (objPtr->typePtr == &tclIntType) || #ifndef NO_WIDE_TYPE -- cgit v0.12 From 368acc3d50a9ccc0787da6495ca53a107c5a6d69 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 15 Apr 2018 23:06:00 +0000 Subject: Fix [9f3c253df5eec5669673d05fe3a51e4afcf99418|9f3c253df5]: Tcl build broken on Win. Re-introduce TCL_NORETURN1, apparently still needed on MSVC. --- generic/tcl.h | 2 ++ generic/tclDecls.h | 6 +++--- tools/genStubs.tcl | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/generic/tcl.h b/generic/tcl.h index 789d22c..c721e33 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -114,6 +114,7 @@ extern "C" { # define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__printf__, a, b))) # define TCL_NORETURN __attribute__ ((noreturn)) # define TCL_NOINLINE __attribute__ ((noinline)) +# define TCL_NORETURN1 __attribute__ ((noreturn)) #else # define TCL_FORMAT_PRINTF(a,b) # if defined(_MSC_VER) && (_MSC_VER >= 1310) @@ -123,6 +124,7 @@ extern "C" { # define TCL_NORETURN /* nothing */ # define TCL_NOINLINE /* nothing */ # endif +# define TCL_NORETURN1 /* nothing */ #endif /* diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 710cbec..af0f181 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -1794,7 +1794,7 @@ typedef struct TclStubs { int (*tcl_PkgProvideEx) (Tcl_Interp *interp, const char *name, const char *version, const void *clientData); /* 0 */ const char * (*tcl_PkgRequireEx) (Tcl_Interp *interp, const char *name, const char *version, int exact, void *clientDataPtr); /* 1 */ - TCL_NORETURN void (*tcl_Panic) (const char *format, ...) TCL_FORMAT_PRINTF(1, 2); /* 2 */ + TCL_NORETURN1 void (*tcl_Panic) (const char *format, ...) TCL_FORMAT_PRINTF(1, 2); /* 2 */ char * (*tcl_Alloc) (unsigned int size); /* 3 */ void (*tcl_Free) (char *ptr); /* 4 */ char * (*tcl_Realloc) (char *ptr, unsigned int size); /* 5 */ @@ -1941,7 +1941,7 @@ typedef struct TclStubs { int (*tcl_EvalFile) (Tcl_Interp *interp, const char *fileName); /* 130 */ void (*reserved131)(void); void (*tcl_EventuallyFree) (ClientData clientData, Tcl_FreeProc *freeProc); /* 132 */ - TCL_NORETURN void (*tcl_Exit) (int status); /* 133 */ + TCL_NORETURN1 void (*tcl_Exit) (int status); /* 133 */ int (*tcl_ExposeCommand) (Tcl_Interp *interp, const char *hiddenCmdToken, const char *cmdName); /* 134 */ int (*tcl_ExprBoolean) (Tcl_Interp *interp, const char *expr, int *ptr); /* 135 */ int (*tcl_ExprBooleanObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *ptr); /* 136 */ @@ -2110,7 +2110,7 @@ typedef struct TclStubs { int (*tcl_EvalEx) (Tcl_Interp *interp, const char *script, int numBytes, int flags); /* 291 */ int (*tcl_EvalObjv) (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); /* 292 */ int (*tcl_EvalObjEx) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 293 */ - TCL_NORETURN void (*tcl_ExitThread) (int status); /* 294 */ + TCL_NORETURN1 void (*tcl_ExitThread) (int status); /* 294 */ int (*tcl_ExternalToUtf) (Tcl_Interp *interp, Tcl_Encoding encoding, const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); /* 295 */ char * (*tcl_ExternalToUtfDString) (Tcl_Encoding encoding, const char *src, int srcLen, Tcl_DString *dsPtr); /* 296 */ void (*tcl_FinalizeThread) (void); /* 297 */ diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index a345437..830ba2b 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -600,6 +600,8 @@ proc genStubs::makeSlot {name decl index} { } if {[string range $rtype end-8 end] eq "__stdcall"} { append text [string trim [string range $rtype 0 end-9]] " (__stdcall *" $lfname ") " + } elseif {[string range $rtype 0 11] eq "TCL_NORETURN"} { + append text "TCL_NORETURN1 " [string trim [string range $rtype 12 end]] " (*" $lfname ") " } else { append text $rtype " (*" $lfname ") " } -- cgit v0.12