Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1954 expr fails with wide int objects

obsolete: 8.4b1
closed-fixed
9
2002-07-10
2002-07-09
David Cuthbert
No

When defining a new math function with
Tcl_CreateMathFunc(), expr will pass wide integers into
the function but refuses to handle them as results.

The problem is in ExprCallMathFunc:

/*
* Push the call's object result.
*/

if (funcResult.type == TCL_INT) {
PUSH_OBJECT(Tcl_NewLongObj(funcResult.intValue));
} else {
d = funcResult.doubleValue;
if (IS_NAN(d) || IS_INF(d)) {
TclExprFloatError(interp, d);
result = TCL_ERROR;
goto done;
}
PUSH_OBJECT(Tcl_NewDoubleObj(d));
}

Obviously not handling TCL_WIDE_INT objects here.

Discussion

  • Jeffrey Hobbs
    Jeffrey Hobbs
    2002-07-09

    Logged In: YES
    user_id=72656

    I believe dkf is the right person for this report.

     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2002-07-09

    • assigned_to: msofer --> dkf
     
    • priority: 5 --> 9
     
  • Logged In: YES
    user_id=79902

    Oops! D'oh! (Fix tomorrow morning...)

     
    • status: open --> closed-fixed