From 60b9635c79e752243857961c3b4b95e1fe4570c6 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 25 Apr 2012 05:53:14 +0000 Subject: [PATCH] Fix uninitialised variable in Lua SWIGTYPE **OUTPUT typemaps git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13016 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- CHANGES.current | 3 +++ Lib/lua/typemaps.i | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.current b/CHANGES.current index 0b7de2539..df57de6e7 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -5,3 +5,6 @@ See the RELEASENOTES file for a summary of changes in each release. Version 2.0.6 (in progress) =========================== +2012-04-25: wsfulton + [Lua] Fix uninitialised variable in SWIGTYPE **OUTPUT typemaps as reported by Jim Anderson. + diff --git a/Lib/lua/typemaps.i b/Lib/lua/typemaps.i index 180d17fd6..63cb49a0d 100644 --- a/Lib/lua/typemaps.i +++ b/Lib/lua/typemaps.i @@ -557,7 +557,8 @@ ptr=nil -- the iMath* will be GC'ed as normal */ %typemap(in,numinputs=0) SWIGTYPE** OUTPUT ($*ltype temp) -%{ $1 = &temp; %} +%{ temp = ($*ltype)0; + $1 = &temp; %} %typemap(argout) SWIGTYPE** OUTPUT %{SWIG_NewPointerObj(L,*$1,$*descriptor,1); SWIG_arg++; %}