Menu

#7 regression: orafetch -command doesn't return rc code

closed-accepted
None
5
2007-10-27
2007-10-02
No

With oratcl4.3 I wrote this code.

while { [orafetch $c -datavariable row -command {
uplevel $cmd
}]] == 0 } {}

It works as expected. But not with Oratcl 4.4!
In Oratcl_Fetch the call to Tcl_EvalObjEx() overwrites the result. My trivial patch restores the behaviour of Oratcl 4.3:

*** oratcl.c.old Tue Apr 25 16:29:11 2006
--- oratcl.c Tue Oct 2 14:16:22 2007
***************
*** 5984,5989 ****
--- 5984,5991 ----

if (evalObjPtr) {
tcl_return = Tcl_EvalObjEx(interp, evalObjPtr, 0);
+ if( tcl_return == TCL_OK )
+ Tcl_SetObjResult(interp, Tcl_NewIntObj(0));
}

common_exit:

Discussion

  • Todd Helfter

    Todd Helfter - 2007-10-27

    Logged In: YES
    user_id=92123
    Originator: NO

    This has been accepted.

    I've updated the CVS repository for Oratcl 4.4 and the CVS Head so it will be in the next release as well

    Thank you
    -Todd

     
  • Todd Helfter

    Todd Helfter - 2007-10-27
    • assigned_to: nobody --> tmh
    • status: open --> closed-accepted
     

Log in to post a comment.