diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-10-15 17:54:36 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-10-15 17:54:36 (GMT) |
commit | 8be498883b3dc64f676cee505d300aa8a111f321 (patch) | |
tree | cfee0b16b4af77fc96502febd298297c15678cf7 /generic | |
parent | e8c71c8d77a88b01a75b6d6e62b819b5c60c4ddd (diff) | |
parent | 8fda4dd37512f41e1e7b277e11b450cd7185d5ed (diff) | |
download | tcl-8be498883b3dc64f676cee505d300aa8a111f321.zip tcl-8be498883b3dc64f676cee505d300aa8a111f321.tar.gz tcl-8be498883b3dc64f676cee505d300aa8a111f321.tar.bz2 |
Merge 8.6. Use (void *)NULL in stead of NULL for C++
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclAssembly.c | 42 | ||||
-rw-r--r-- | generic/tclExecute.c | 2 | ||||
-rw-r--r-- | generic/tclStrToD.c | 4 |
3 files changed, 24 insertions, 24 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c index ab5cd7a..e7ce6e6 100644 --- a/generic/tclAssembly.c +++ b/generic/tclAssembly.c @@ -1386,7 +1386,7 @@ AssembleOneLine( if (opnd < 0 || opnd > 3) { Tcl_SetObjResult(interp, Tcl_NewStringObj("operand must be [0..3]", -1)); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "OPERAND<0,>3", NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "OPERAND<0,>3", (void *)NULL); goto cleanup; } BBEmitInstInt1(assemEnvPtr, tblIdx, opnd, opnd); @@ -1627,7 +1627,7 @@ AssembleOneLine( if (assemEnvPtr->flags & TCL_EVAL_DIRECT) { Tcl_SetObjResult(interp, Tcl_NewStringObj("operand must be >=2", -1)); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "OPERAND>=2", NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "OPERAND>=2", (void *)NULL); } goto cleanup; } @@ -1993,7 +1993,7 @@ CreateMirrorJumpTable( Tcl_SetObjResult(interp, Tcl_NewStringObj( "jump table must have an even number of list elements", -1)); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADJUMPTABLE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADJUMPTABLE", (void *)NULL); } return TCL_ERROR; } @@ -2024,7 +2024,7 @@ CreateMirrorJumpTable( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "duplicate entry in jump table for \"%s\"", TclGetString(objv[i]))); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "DUPJUMPTABLEENTRY"); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "DUPJUMPTABLEENTRY", (void *)NULL); DeleteMirrorJumpTable(jtPtr); return TCL_ERROR; } @@ -2109,7 +2109,7 @@ GetNextOperand( if (assemEnvPtr->flags & TCL_EVAL_DIRECT) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "assembly code may not contain substitutions", -1)); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "NOSUBST", NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "NOSUBST", (void *)NULL); } return TCL_ERROR; } @@ -2332,7 +2332,7 @@ FindLocalVar( Tcl_SetObjResult(interp, Tcl_NewStringObj( "cannot use this instruction to create a variable" " in a non-proc context", -1)); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "LVT", NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "LVT", (void *)NULL); } return -1; } @@ -2367,7 +2367,7 @@ CheckNamespaceQualifiers( if ((*p == ':') && (p[1] == ':')) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "variable \"%s\" is not local", name)); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "NONLOCAL", name, NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "NONLOCAL", name, (void *)NULL); return TCL_ERROR; } } @@ -2403,7 +2403,7 @@ CheckOneByte( if (value < 0 || value > 0xFF) { result = Tcl_NewStringObj("operand does not fit in one byte", -1); Tcl_SetObjResult(interp, result); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "1BYTE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "1BYTE", (void *)NULL); return TCL_ERROR; } return TCL_OK; @@ -2438,7 +2438,7 @@ CheckSignedOneByte( if (value > 0x7F || value < -0x80) { result = Tcl_NewStringObj("operand does not fit in one byte", -1); Tcl_SetObjResult(interp, result); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "1BYTE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "1BYTE", (void *)NULL); return TCL_ERROR; } return TCL_OK; @@ -2471,7 +2471,7 @@ CheckNonNegative( if (value < 0) { result = Tcl_NewStringObj("operand must be nonnegative", -1); Tcl_SetObjResult(interp, result); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "NONNEGATIVE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "NONNEGATIVE", (void *)NULL); return TCL_ERROR; } return TCL_OK; @@ -2504,7 +2504,7 @@ CheckStrictlyPositive( if (value <= 0) { result = Tcl_NewStringObj("operand must be positive", -1); Tcl_SetObjResult(interp, result); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "POSITIVE", NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "POSITIVE", (void *)NULL); return TCL_ERROR; } return TCL_OK; @@ -2556,7 +2556,7 @@ DefineLabel( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "duplicate definition of label \"%s\"", labelName)); Tcl_SetErrorCode(interp, "TCL", "ASSEM", "DUPLABEL", labelName, - NULL); + (void *)NULL); } return TCL_ERROR; } @@ -2957,7 +2957,7 @@ ReportUndefinedLabel( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "undefined label \"%s\"", TclGetString(jumpTarget))); Tcl_SetErrorCode(interp, "TCL", "ASSEM", "NOLABEL", - TclGetString(jumpTarget), NULL); + TclGetString(jumpTarget), (void *)NULL); Tcl_SetErrorLine(interp, bbPtr->jumpLine); } } @@ -3242,7 +3242,7 @@ CheckNonThrowingBlock( "a context where an exception has been " "caught and not disposed of.", tclInstructionTable[opcode].name)); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADTHROW", NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADTHROW", (void *)NULL); AddBasicBlockRangeToErrorInfo(assemEnvPtr, blockPtr); } return TCL_ERROR; @@ -3422,7 +3422,7 @@ StackCheckBasicBlock( */ Tcl_SetErrorLine(interp, blockPtr->startLine); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADSTACK", NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADSTACK", (void *)NULL); } return TCL_ERROR; } @@ -3445,7 +3445,7 @@ StackCheckBasicBlock( if (initialStackDepth + blockPtr->minStackDepth < 0) { if (assemEnvPtr->flags & TCL_EVAL_DIRECT) { Tcl_SetObjResult(interp, Tcl_NewStringObj("stack underflow", -1)); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADSTACK", NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADSTACK", (void *)NULL); AddBasicBlockRangeToErrorInfo(assemEnvPtr, blockPtr); Tcl_SetErrorLine(interp, blockPtr->startLine); } @@ -3464,7 +3464,7 @@ StackCheckBasicBlock( if (assemEnvPtr->flags & TCL_EVAL_DIRECT) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "code pops stack below level of enclosing catch", -1)); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADSTACKINCATCH", -1); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADSTACKINCATCH", (void *)NULL); AddBasicBlockRangeToErrorInfo(assemEnvPtr, blockPtr); Tcl_SetErrorLine(interp, blockPtr->startLine); } @@ -3592,7 +3592,7 @@ StackCheckExit( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "stack is unbalanced on exit from the code (depth=%d)", depth)); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADSTACK", NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADSTACK", (void *)NULL); } return TCL_ERROR; } @@ -3737,7 +3737,7 @@ ProcessCatchesInBasicBlock( "execution reaches an instruction in inconsistent " "exception contexts", -1)); Tcl_SetErrorLine(interp, bbPtr->startLine); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADCATCH", NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADCATCH", (void *)NULL); } return TCL_ERROR; } @@ -3796,7 +3796,7 @@ ProcessCatchesInBasicBlock( Tcl_SetObjResult(interp, Tcl_NewStringObj( "endCatch without a corresponding beginCatch", -1)); Tcl_SetErrorLine(interp, bbPtr->startLine); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADENDCATCH", NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADENDCATCH", (void *)NULL); } return TCL_ERROR; } @@ -3872,7 +3872,7 @@ CheckForUnclosedCatches( "catch still active on exit from assembly code", -1)); Tcl_SetErrorLine(interp, assemEnvPtr->curr_bb->enclosingCatch->startLine); - Tcl_SetErrorCode(interp, "TCL", "ASSEM", "UNCLOSEDCATCH", NULL); + Tcl_SetErrorCode(interp, "TCL", "ASSEM", "UNCLOSEDCATCH", (void *)NULL); } return TCL_ERROR; } diff --git a/generic/tclExecute.c b/generic/tclExecute.c index f188950..22dc200 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -8364,7 +8364,7 @@ ExecuteExtendedBinaryMathOp( } Tcl_GetBignumFromObj(NULL, valuePtr, &big1); Tcl_GetBignumFromObj(NULL, value2Ptr, &big2); - err = mp_init_multi(&bigResult, &bigRemainder, NULL); + err = mp_init_multi(&bigResult, &bigRemainder, (void *)NULL); if (err == MP_OKAY) { err = mp_div(&big1, &big2, &bigResult, &bigRemainder); } diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index 9a0337a..78ab911 100644 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -3716,7 +3716,7 @@ ShorteningBignumConversionPowD( if (m2plus > m2minus) { mp_clear(&mplus); } - mp_clear_multi(&b, &mminus, &temp, NULL); + mp_clear_multi(&b, &mminus, &temp, (void *)NULL); *s = '\0'; *decpt = k; if (endPtr) { @@ -4153,7 +4153,7 @@ ShorteningBignumConversion( if (m2plus > m2minus) { mp_clear(&mplus); } - mp_clear_multi(&b, &mminus, &dig, &S, NULL); + mp_clear_multi(&b, &mminus, &dig, &S, (void *)NULL); *s = '\0'; *decpt = k; if (endPtr) { |