]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
tcl bindings: fix appdata code
authorMichael Schroeder <mls@suse.de>
Fri, 21 Aug 2015 09:26:57 +0000 (11:26 +0200)
committerMichael Schroeder <mls@suse.de>
Fri, 21 Aug 2015 09:26:57 +0000 (11:26 +0200)
bindings/solv.i

index d9a9ebf755df62d69e4cb8b0ed398df73772a5d4..5476c7fd1bf08201202d677b701cc9a31bce68a3 100644 (file)
@@ -431,8 +431,13 @@ typedef VALUE AppObjectPtr;
   $result = (VALUE)$1;
 }
 #elif defined(SWIGTCL)
-typedef TclObj *AppObjectPtr;
+typedef Tcl_Obj *AppObjectPtr;
+%typemap(in) AppObjectPtr {
+  $1 = (void *)$input;
+}
 %typemap(out) AppObjectPtr {
+  if ($1)
+    Tcl_IncrRefCount((Tcl_Obj *)$1);
   Tcl_SetObjResult(interp, $1 ? $1 : Tcl_NewObj());
 }
 #else