summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2014-11-13 20:16:54 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2014-11-13 20:16:54 (GMT)
commit505fc3b59c230b1423214e251ad4f99ba80b4501 (patch)
tree0a03fddb5d59efb1cd950b7cb4373b35ad98aa15 /win
parent02032c4074f46a24a4a13dd719ecd971c6c6be5e (diff)
downloadtk-505fc3b59c230b1423214e251ad4f99ba80b4501.zip
tk-505fc3b59c230b1423214e251ad4f99ba80b4501.tar.gz
tk-505fc3b59c230b1423214e251ad4f99ba80b4501.tar.bz2
Backout last change, it doesn't solve the issue
Diffstat (limited to 'win')
-rw-r--r--win/tkWinDialog.c52
1 files changed, 2 insertions, 50 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index 69dcb06..c90d05a 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -1009,28 +1009,10 @@ Tk_GetSaveFileObjCmd(
*/
static void CleanupOFNOptions(OFNOpts *optsPtr)
{
- if (optsPtr->extObj) {
- Tcl_DecrRefCount(optsPtr->extObj);
- optsPtr->extObj = NULL;
- }
- if (optsPtr->titleObj) {
- Tcl_DecrRefCount(optsPtr->titleObj);
- optsPtr->titleObj = NULL;
- }
- if (optsPtr->filterObj) {
- Tcl_DecrRefCount(optsPtr->filterObj);
- optsPtr->filterObj = NULL;
- }
- if (optsPtr->typeVariableObj) {
- Tcl_DecrRefCount(optsPtr->typeVariableObj);
- optsPtr->typeVariableObj = NULL;
- }
- if (optsPtr->initialTypeObj) {
- Tcl_DecrRefCount(optsPtr->initialTypeObj);
- optsPtr->initialTypeObj = NULL;
- }
Tcl_DStringFree(&optsPtr->utfDirString);
}
+
+
/*
*----------------------------------------------------------------------
@@ -1142,21 +1124,9 @@ ParseOFNOptions(
string = Tcl_GetString(valuePtr);
switch (options[index].value) {
case FILE_DEFAULT:
- if (valuePtr) {
- Tcl_IncrRefCount(valuePtr);
- }
- if (optsPtr->extObj) {
- Tcl_DecrRefCount(optsPtr->extObj);
- }
optsPtr->extObj = valuePtr;
break;
case FILE_TYPES:
- if (valuePtr) {
- Tcl_IncrRefCount(valuePtr);
- }
- if (optsPtr->filterObj) {
- Tcl_DecrRefCount(optsPtr->filterObj);
- }
optsPtr->filterObj = valuePtr;
break;
case FILE_INITDIR:
@@ -1180,30 +1150,12 @@ ParseOFNOptions(
goto error_return;
break;
case FILE_TITLE:
- if (valuePtr) {
- Tcl_IncrRefCount(valuePtr);
- }
- if (optsPtr->titleObj) {
- Tcl_DecrRefCount(optsPtr->titleObj);
- }
optsPtr->titleObj = valuePtr;
break;
case FILE_TYPEVARIABLE:
- if (valuePtr) {
- Tcl_IncrRefCount(valuePtr);
- }
- if (optsPtr->typeVariableObj) {
- Tcl_DecrRefCount(optsPtr->typeVariableObj);
- }
optsPtr->typeVariableObj = valuePtr;
- if (optsPtr->initialTypeObj) {
- Tcl_DecrRefCount(optsPtr->initialTypeObj);
- }
optsPtr->initialTypeObj = Tcl_ObjGetVar2(interp, valuePtr,
NULL, TCL_GLOBAL_ONLY);
- if (optsPtr->initialTypeObj) {
- Tcl_IncrRefCount(optsPtr->initialTypeObj);
- }
break;
case FILE_MULTIPLE:
if (Tcl_GetBooleanFromObj(interp, valuePtr,