Fix for Perl incorrectly taking memory ownership for return types that are typedefs to a struct/class pointer

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7051 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-03-08 21:55:08 +00:00
commit 5fdad83539

View file

@ -654,8 +654,7 @@ public:
} else {
Replaceall(tm, "$shadow", "0");
}
if ((!SwigType_ispointer(t) && !SwigType_isreference(t))
|| Getattr(n,"feature:new")) {
if (Getattr(n,"feature:new")) {
Replaceall(tm,"$owner","SWIG_OWNER");
} else {
Replaceall(tm,"$owner","0");