Perl - Add support for missing directorfree typemaps
Related to issue #1167, to free up memory when returning reference types. SWIG_Perl_AcquirePtr still needs implementing.
This commit is contained in:
parent
e86c881a70
commit
717b7866d4
3 changed files with 21 additions and 0 deletions
|
|
@ -900,6 +900,15 @@ public:
|
|||
Printf(f->code, "%s\n", tm);
|
||||
}
|
||||
|
||||
if (director_method) {
|
||||
if ((tm = Swig_typemap_lookup("directorfree", n, Swig_cresult_name(), 0))) {
|
||||
Replaceall(tm, "$input", Swig_cresult_name());
|
||||
Replaceall(tm, "$result", "ST(argvi)");
|
||||
Printf(f->code, "%s\n", tm);
|
||||
Delete(tm);
|
||||
}
|
||||
}
|
||||
|
||||
Printv(f->code, "XSRETURN(argvi);\n", "fail:\n", cleanup, "SWIG_croak_null();\n" "}\n" "}\n", NIL);
|
||||
|
||||
/* Add the dXSARGS last */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue