add support for newfree typemaps in php module

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9640 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2007-01-12 23:41:49 +00:00
commit 9f88801914
2 changed files with 16 additions and 1 deletions

View file

@ -1,5 +1,9 @@
Version 1.3.32 (in progress)
============================
01/12/2007: wsfulton
[Php] Add support for newfree typemaps (sometimes used by %newobject)
01/12/2007: beazley
New command line option -macroerrors. When supplied, this will force
the C scanner/parser to report proper location information for code contained

View file

@ -1254,11 +1254,22 @@ public:
if (cleanup) {
Printv(f->code, cleanup, NIL);
}
// What's this bit for?
/* Look to see if there is any newfree cleanup code */
if (GetFlag(n, "feature:new")) {
if ((tm = Swig_typemap_lookup_new("newfree", n, "result", 0))) {
Printf(f->code, "%s\n", tm);
Delete(tm);
}
}
/* See if there is any return cleanup code */
if ((tm = Swig_typemap_lookup_new("ret", n, "result", 0))) {
Printf(f->code, "%s\n", tm);
Delete(tm);
}
if (mvr) {
if (!mvrset) {
Printf(f->code, "return _return_value;\n");