diff options
author | joye <joye> | 2014-04-03 20:40:08 (GMT) |
---|---|---|
committer | joye <joye> | 2014-04-03 20:40:08 (GMT) |
commit | 103a3273b0f027f25bb7740a8ee8bf52116704b4 (patch) | |
tree | 29c5fe67c9aceb862378883698b8f8ac442029e6 /src | |
parent | 8caa381d7de028759d2df259c629989adb568e30 (diff) | |
download | blt-103a3273b0f027f25bb7740a8ee8bf52116704b4.zip blt-103a3273b0f027f25bb7740a8ee8bf52116704b4.tar.gz blt-103a3273b0f027f25bb7740a8ee8bf52116704b4.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r-- | src/bltGrElemOp.C | 5 | ||||
-rw-r--r-- | src/bltGrPenBar.C | 6 | ||||
-rw-r--r-- | src/bltGrPenLine.C | 2 | ||||
-rw-r--r-- | src/bltGrPenOp.C | 6 |
4 files changed, 12 insertions, 7 deletions
diff --git a/src/bltGrElemOp.C b/src/bltGrElemOp.C index 2542fb0..23a6a22 100644 --- a/src/bltGrElemOp.C +++ b/src/bltGrElemOp.C @@ -130,7 +130,8 @@ static void DestroyElement(Element* elemPtr) if (elemPtr->obj.name) free((void*)(elemPtr->obj.name)); - Tk_FreeConfigOptions((char*)elemPtr, elemPtr->optionTable, graphPtr->tkwin); + Tk_FreeConfigOptions((char*)elemPtr->ops, elemPtr->optionTable, + graphPtr->tkwin); (*elemPtr->procsPtr->destroyProc) (graphPtr, elemPtr); @@ -197,7 +198,7 @@ static int ElementObjConfigure(Tcl_Interp* interp, Graph* graphPtr, for (error=0; error<=1; error++) { if (!error) { - if (Tk_SetOptions(interp, (char*)elemPtr, elemPtr->optionTable, + if (Tk_SetOptions(interp, (char*)elemPtr->ops, elemPtr->optionTable, objc, objv, graphPtr->tkwin, &savedOptions, &mask) != TCL_OK) continue; diff --git a/src/bltGrPenBar.C b/src/bltGrPenBar.C index 6625b24..c624690 100644 --- a/src/bltGrPenBar.C +++ b/src/bltGrPenBar.C @@ -173,6 +173,10 @@ void DestroyBarPenProc(Graph* graphPtr, Pen* penPtr) if (bpPtr->errorBarGC) Tk_FreeGC(graphPtr->display, bpPtr->errorBarGC); - Tk_FreeConfigOptions((char*)bpPtr, bpPtr->optionTable, graphPtr->tkwin); + Tk_FreeConfigOptions((char*)bpPtr->ops, bpPtr->optionTable, graphPtr->tkwin); + + if (bpPtr->manageOptions) + if (bpPtr->ops) + free(bpPtr->ops); } diff --git a/src/bltGrPenLine.C b/src/bltGrPenLine.C index 1e4a49e..312039c 100644 --- a/src/bltGrPenLine.C +++ b/src/bltGrPenLine.C @@ -360,7 +360,7 @@ void DestroyLinePenProc(Graph* graphPtr, Pen* penPtr) ops->symbol.mask = None; } - Tk_FreeConfigOptions((char*)lpPtr, lpPtr->optionTable, graphPtr->tkwin); + Tk_FreeConfigOptions((char*)lpPtr->ops, lpPtr->optionTable, graphPtr->tkwin); if (lpPtr->manageOptions) if (lpPtr->ops) diff --git a/src/bltGrPenOp.C b/src/bltGrPenOp.C index b6ec534..651db4b 100644 --- a/src/bltGrPenOp.C +++ b/src/bltGrPenOp.C @@ -164,7 +164,7 @@ static int PenObjConfigure(Tcl_Interp* interp, Graph* graphPtr, Pen* penPtr, for (error=0; error<=1; error++) { if (!error) { - if (Tk_SetOptions(interp, (char*)penPtr, penPtr->optionTable, + if (Tk_SetOptions(interp, (char*)penPtr->ops, penPtr->optionTable, objc, objv, graphPtr->tkwin, &savedOptions, &mask) != TCL_OK) continue; @@ -315,9 +315,8 @@ void Blt_FreePen(Pen* penPtr) { if (penPtr != NULL) { penPtr->refCount--; - if ((penPtr->refCount == 0) && (penPtr->flags & DELETE_PENDING)) { + if ((penPtr->refCount == 0) && (penPtr->flags & DELETE_PENDING)) DestroyPen(penPtr); - } } } @@ -349,6 +348,7 @@ int Blt_GetPenFromObj(Tcl_Interp* interp, Graph* graphPtr, Tcl_Obj *objPtr, penPtr->refCount++; *penPtrPtr = penPtr; + return TCL_OK; } |