Changeset 1465


Ignore:
Timestamp:
May 20, 2009 3:04:55 PM (12 years ago)
Author:
gah
Message:

fix for unirect2d unirect3d flow loaders

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/FlowCmd.cpp

    r1462 r1465  
    709709        cmdInfo.objClientData = (ClientData)dataPtr;   
    710710        Tcl_SetCommandInfo(interp, "unirect3d", &cmdInfo);
    711         if (Tcl_Eval(interp, (const char *)bytes) != TCL_OK) {
     711        Tcl_Obj *objPtr;
     712        objPtr = Tcl_NewStringObj(buf.bytes(), buf.size());
     713        int result;
     714        Tcl_IncrRefCount(objPtr);
     715        result = Tcl_GlobalEvalObj(interp, objPtr);
     716        Tcl_DecrRefCount(objPtr);
     717        if (result != TCL_OK) {
    712718            delete dataPtr;
    713719            return TCL_ERROR;
     
    730736        cmdInfo.objClientData = (ClientData)dataPtr;   
    731737        Tcl_SetCommandInfo(interp, "unirect2d", &cmdInfo);
    732         if (Tcl_Eval(interp, (const char *)bytes) != TCL_OK) {
     738        Tcl_Obj *objPtr;
     739        objPtr = Tcl_NewStringObj(buf.bytes(), buf.size());
     740        int result;
     741        Tcl_IncrRefCount(objPtr);
     742        result = Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_GLOBAL|TCL_EVAL_DIRECT);
     743        Tcl_DecrRefCount(objPtr);
     744        if (result != TCL_OK) {
    733745            delete dataPtr;
    734746            return TCL_ERROR;
     
    821833        cmdInfo.objClientData = (ClientData)dataPtr;   
    822834        Tcl_SetCommandInfo(interp, "unirect3d", &cmdInfo);
    823         if (Tcl_Eval(interp, bytes) != TCL_OK) {
     835        Tcl_Obj *objPtr;
     836        objPtr = Tcl_NewStringObj(buf.bytes(), buf.size());
     837        int result;
     838        Tcl_IncrRefCount(objPtr);
     839        result = Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_GLOBAL|TCL_EVAL_DIRECT);
     840        Tcl_DecrRefCount(objPtr);
     841        if (result != TCL_OK) {
    824842            delete dataPtr;
    825843            return TCL_ERROR;
     
    842860        cmdInfo.objClientData = (ClientData)dataPtr;   
    843861        Tcl_SetCommandInfo(interp, "unirect2d", &cmdInfo);
    844         if (Tcl_Eval(interp, bytes) != TCL_OK) {
     862        Tcl_Obj *objPtr;
     863        objPtr = Tcl_NewStringObj(buf.bytes(), buf.size());
     864        int result;
     865        Tcl_IncrRefCount(objPtr);
     866        result = Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_GLOBAL|TCL_EVAL_DIRECT);
     867        Tcl_DecrRefCount(objPtr);
     868        if (result != TCL_OK) {
    845869            delete dataPtr;
    846870            return TCL_ERROR;
Note: See TracChangeset for help on using the changeset viewer.