diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-07-21 15:28:09 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-07-21 15:28:09 (GMT) |
commit | ccd2ac73e91a76cec19cc2c52a1d5f489dd88ae7 (patch) | |
tree | a1c277681948338fd6e60cd50d302ee1d9bc344c /generic/tclLink.c | |
parent | 6d64f87088894b818855270f1a8a7aea6ebfae0b (diff) | |
parent | 57f0eb9556674426578429b0bfe081f563e1ed63 (diff) | |
download | tcl-ccd2ac73e91a76cec19cc2c52a1d5f489dd88ae7.zip tcl-ccd2ac73e91a76cec19cc2c52a1d5f489dd88ae7.tar.gz tcl-ccd2ac73e91a76cec19cc2c52a1d5f489dd88ae7.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic/tclLink.c')
-rw-r--r-- | generic/tclLink.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/generic/tclLink.c b/generic/tclLink.c index 839cc0c..2649d12 100644 --- a/generic/tclLink.c +++ b/generic/tclLink.c @@ -95,7 +95,7 @@ typedef struct { * Forward references to functions defined later in this file: */ -static char * LinkTraceProc(ClientData clientData,Tcl_Interp *interp, +static char * LinkTraceProc(void *clientData,Tcl_Interp *interp, const char *name1, const char *name2, int flags); static Tcl_Obj * ObjValue(Link *linkPtr); static void LinkFree(Link *linkPtr); @@ -527,7 +527,7 @@ GetUWide( Tcl_WideUInt *uwidePtr) { Tcl_WideInt *widePtr = (Tcl_WideInt *) uwidePtr; - ClientData clientData; + void *clientData; int type, intValue; if (TclGetNumberFromObj(NULL, objPtr, &clientData, &type) == TCL_OK) { @@ -631,8 +631,9 @@ SetInvalidRealFromAny( TCL_UNUSED(Tcl_Interp *), Tcl_Obj *objPtr) { + const char *str; + const char *endPtr; size_t length; - const char *str, *endPtr; str = Tcl_GetStringFromObj(objPtr, &length); if ((length == 1) && (str[0] == '.')) { @@ -643,8 +644,8 @@ SetInvalidRealFromAny( if (TclParseNumber(NULL, objPtr, NULL, str, length, &endPtr, TCL_PARSE_DECIMAL_ONLY) == TCL_OK) { /* - * If number is followed by [eE][+-]?, then it is an invalid double, - * but it could be the start of a valid double. + * If number is followed by [eE][+-]?, then it is an invalid + * double, but it could be the start of a valid double. */ if (*endPtr == 'e' || *endPtr == 'E') { @@ -667,10 +668,10 @@ SetInvalidRealFromAny( } /* - * This function checks for integer representations, which are valid when - * linking with C variables, but which are invalid in other contexts in Tcl. - * Handled are "+", "-", "", "0x", "0b", "0d" and "0o" (upper- and - * lower-case). See bug [39f6304c2e]. + * This function checks for integer representations, which are valid + * when linking with C variables, but which are invalid in other + * contexts in Tcl. Handled are "+", "-", "", "0x", "0b", "0d" and "0o" + * (upperand lowercase). See bug [39f6304c2e]. */ static int @@ -681,8 +682,8 @@ GetInvalidIntFromObj( size_t length; const char *str = Tcl_GetStringFromObj(objPtr, &length); - if ((length == 0) || - ((length == 2) && (str[0] == '0') && strchr("xXbBoOdD", str[1]))) { + if ((length == 0) || ((length == 2) && (str[0] == '0') + && strchr("xXbBoOdD", str[1]))) { *intPtr = 0; return TCL_OK; } else if ((length == 1) && strchr("+-", str[0])) { @@ -693,10 +694,10 @@ GetInvalidIntFromObj( } /* - * This function checks for double representations, which are valid when - * linking with C variables, but which are invalid in other contexts in Tcl. - * Handled are "+", "-", "", ".", "0x", "0b" and "0o" (upper- and lower-case) - * and sequences like "1e-". See bug [39f6304c2e]. + * This function checks for double representations, which are valid + * when linking with C variables, but which are invalid in other + * contexts in Tcl. Handled are "+", "-", "", ".", "0x", "0b" and "0o" + * (upper- and lowercase) and sequences like "1e-". See bug [39f6304c2e]. */ static int @@ -744,7 +745,7 @@ GetInvalidDoubleFromObj( static char * LinkTraceProc( - ClientData clientData, /* Contains information about the link. */ + void *clientData, /* Contains information about the link. */ Tcl_Interp *interp, /* Interpreter containing Tcl variable. */ TCL_UNUSED(const char *) /*name1*/, TCL_UNUSED(const char *) /*name2*/, |