Skip to content
Tcl Source Code View Ticket
Login

View Ticket

expr fails with wide int objects

Closed / Fixed579284ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2002-07-09 20:14:29
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.
hobbsplain2002-07-10 03:25:36
Logged In: YES 
user_id=72656

I believe dkf is the right person for this report.
dkfplain2002-07-10 04:03:23
Logged In: YES 
user_id=79902

Oops!  D'oh!  (Fix tomorrow morning...)
dkf Closed ticket [579284ffff]. [History diff]2002-07-10 15:26:23
Log in (anonymous is fine) to add a comment.