From: Michael Schroeder Date: Fri, 21 Aug 2015 09:26:57 +0000 (+0200) Subject: tcl bindings: fix appdata code X-Git-Tag: 0.6.12~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a45b18a377b7838159c82ea0f9d5e98b58b91e7;p=thirdparty%2Flibsolv.git tcl bindings: fix appdata code --- diff --git a/bindings/solv.i b/bindings/solv.i index d9a9ebf7..5476c7fd 100644 --- a/bindings/solv.i +++ b/bindings/solv.i @@ -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