diff options
author | joye <joye> | 2014-07-07 15:14:46 (GMT) |
---|---|---|
committer | joye <joye> | 2014-07-07 15:14:46 (GMT) |
commit | 1934dce0ab94d1757af6e4e3ce9b1f7c73399e65 (patch) | |
tree | e3a8d5711d8f5af558444e1bebe1b9635bbc9b4f /src | |
parent | 2afe0c03f7b0853538c7c2b26659bc1bc2dd7545 (diff) | |
download | blt-1934dce0ab94d1757af6e4e3ce9b1f7c73399e65.zip blt-1934dce0ab94d1757af6e4e3ce9b1f7c73399e65.tar.gz blt-1934dce0ab94d1757af6e4e3ce9b1f7c73399e65.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r-- | src/bltConfig.C | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bltConfig.C b/src/bltConfig.C index c43155b..2ff82f9 100644 --- a/src/bltConfig.C +++ b/src/bltConfig.C @@ -148,11 +148,11 @@ static Tcl_Obj* DashesGetProc(ClientData clientData, Tk_Window tkwin, if (!cnt) return Tcl_NewListObj(0, (Tcl_Obj**)NULL); - Tcl_Obj** ll = (Tcl_Obj**)calloc(cnt, sizeof(Tcl_Obj*)); + Tcl_Obj** ll = new Tcl_Obj*[cnt]; for (int ii=0; ii<cnt; ii++) ll[ii] = Tcl_NewIntObj(dashesPtr->values[ii]); Tcl_Obj* listObjPtr = Tcl_NewListObj(cnt, ll); - free(ll); + delete [] ll; return listObjPtr; }; @@ -200,11 +200,11 @@ static Tcl_Obj* ListGetProc(ClientData clientData, Tk_Window tkwin, if (!cnt) return Tcl_NewListObj(0, NULL); - Tcl_Obj** ll = (Tcl_Obj**)calloc(cnt, sizeof(Tcl_Obj*)); + Tcl_Obj** ll = new Tcl_Obj*[cnt]; for (int ii=0; ii<cnt; ii++) ll[ii] = Tcl_NewStringObj((*listPtr)[ii], -1); Tcl_Obj* listObjPtr = Tcl_NewListObj(cnt, ll); - free(ll); + delete [] ll; return listObjPtr; }; |