Unnamed Fossil Project

Check-in [d97a668546]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Removed variable Mp_MathInProgress not actually used for anything. Appears to be cargo cult copied over from pre-8.4 versions of Tcl.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d97a6685467f98d32e9e890e7b5d5a2bb22240cc
User & Date: dgp 2013-04-24 19:52:33
Context
2013-04-25
03:39
Eliminate global variable MpnoEval. check-in: 1064f5e910 user: dgp tags: trunk
2013-04-24
19:52
Removed variable Mp_MathInProgress not actually used for anything. Appears to be cargo cult copied over from pre-8.4 versions of Tcl. check-in: d97a668546 user: dgp tags: trunk
17:07
Bug 9 fix: correct usage of setjmp/longjmp for nesting, multi-interp, and thread safety. check-in: 5216c1592f user: dgp tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/mpexpr.c.

216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
....
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
static char *operatorStrings[] = {
    "VALUE", "(", ")", ",", "END", "UNKNOWN", "6", "7",
    "*", "/", "%", "+", "-", "<<", ">>", "<", ">", "<=",
    ">=", "==", "!=", "&", "^", "|", "&&", "||", "?", ":",
    "-", "+", "!", "~"
};


/*
 * The following global variable is use to signal matherr that Tcl
 * is responsible for the arithmetic, so errors can be handled in a
 * fashion appropriate for Tcl.  Zero means no Tcl math is in
 * progress;  non-zero means Tcl is doing math.
 */

int Mp_MathInProgress = 0;

/*
 * precision and epsilon value for rounding and error allowance
 *
 */

long    mp_precision = MP_PRECISION_DEF;
NUMBER *mp_epsilon    = NULL;
................................................................................
	return TCL_OK;
    }

    /*
     * Invoke the function and copy its result back into valuePtr.
     */

    Mp_MathInProgress++;
    result = (*mathFuncPtr->proc)(mathFuncPtr->clientData, interp, args,
	    &funcResult);
    Mp_MathInProgress--;

    ExprFreeMathArgs(args);

    if (result != TCL_OK) {
        zfree(funcResult.intValue);
        Qfree(funcResult.doubleValue);
	return result;






<
<
<
<
<
<
<
<
<
<







 







<


<







216
217
218
219
220
221
222










223
224
225
226
227
228
229
....
2192
2193
2194
2195
2196
2197
2198

2199
2200

2201
2202
2203
2204
2205
2206
2207
static char *operatorStrings[] = {
    "VALUE", "(", ")", ",", "END", "UNKNOWN", "6", "7",
    "*", "/", "%", "+", "-", "<<", ">>", "<", ">", "<=",
    ">=", "==", "!=", "&", "^", "|", "&&", "||", "?", ":",
    "-", "+", "!", "~"
};











/*
 * precision and epsilon value for rounding and error allowance
 *
 */

long    mp_precision = MP_PRECISION_DEF;
NUMBER *mp_epsilon    = NULL;
................................................................................
	return TCL_OK;
    }

    /*
     * Invoke the function and copy its result back into valuePtr.
     */


    result = (*mathFuncPtr->proc)(mathFuncPtr->clientData, interp, args,
	    &funcResult);


    ExprFreeMathArgs(args);

    if (result != TCL_OK) {
        zfree(funcResult.intValue);
        Qfree(funcResult.doubleValue);
	return result;