From 6a45b18a377b7838159c82ea0f9d5e98b58b91e7 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Fri, 21 Aug 2015 11:26:57 +0200 Subject: [PATCH] tcl bindings: fix appdata code --- bindings/solv.i | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.47.3