diff options
Diffstat (limited to 'generic/tclTomMathInterface.c')
| -rw-r--r-- | generic/tclTomMathInterface.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/generic/tclTomMathInterface.c b/generic/tclTomMathInterface.c index 775e86b..89c1132 100644 --- a/generic/tclTomMathInterface.c +++ b/generic/tclTomMathInterface.c @@ -14,8 +14,9 @@ #include "tclInt.h" #include "tommath.h" +#include <limits.h> -MODULE_SCOPE const TclTomMathStubs tclTomMathStubs; +extern TclTomMathStubs tclTomMathStubs; /* *---------------------------------------------------------------------- @@ -37,12 +38,12 @@ MODULE_SCOPE const TclTomMathStubs tclTomMathStubs; int TclTommath_Init( - Tcl_Interp *interp) /* Tcl interpreter */ -{ + Tcl_Interp* interp /* Tcl interpreter */ +) { /* TIP #268: Full patchlevel instead of just major.minor */ if (Tcl_PkgProvideEx(interp, "tcl::tommath", TCL_PATCH_LEVEL, - &tclTomMathStubs) != TCL_OK) { + (ClientData)&tclTomMathStubs) != TCL_OK) { return TCL_ERROR; } return TCL_OK; @@ -111,7 +112,7 @@ extern void * TclBNAlloc( size_t x) { - return (void *) Tcl_Alloc((unsigned int) x); + return (void *) ckalloc((unsigned int) x); } /* @@ -135,7 +136,7 @@ TclBNRealloc( void *p, size_t s) { - return (void *) Tcl_Realloc((char *) p, (unsigned int) s); + return (void *) ckrealloc((char *) p, (unsigned int) s); } /* @@ -161,7 +162,7 @@ extern void TclBNFree( void *p) { - Tcl_Free((char *) p); + ckfree((char *) p); } #endif @@ -188,7 +189,7 @@ TclBNInitBignumFromLong( { int status; unsigned long v; - mp_digit *p; + mp_digit* p; /* * Allocate enough memory to hold the largest possible long |
