mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
coercion memory leak fix, part 1
This commit is contained in:
parent
d427b8559f
commit
70e1e46a61
@ -2680,10 +2680,6 @@ write_function_instance(ostream &out, InterfaceMaker::Object *obj,
|
||||
}
|
||||
|
||||
string return_expr = remap->call_function(out, extra_indent_level, true, container, pexprs);
|
||||
if (coercion_possible) {
|
||||
indent(out, extra_indent_level)
|
||||
<< "Py_XDECREF(coerced);\n";
|
||||
}
|
||||
if (return_expr.empty()) {
|
||||
if (track_interpreter) {
|
||||
indent(out,extra_indent_level) << "in_interpreter = 1;\n";
|
||||
@ -2697,6 +2693,10 @@ write_function_instance(ostream &out, InterfaceMaker::Object *obj,
|
||||
if (!extra_cleanup.empty()) {
|
||||
indent(out,extra_indent_level) << extra_cleanup << "\n";
|
||||
}
|
||||
if (coercion_possible) {
|
||||
indent(out, extra_indent_level)
|
||||
<< "Py_XDECREF(coerced);\n";
|
||||
}
|
||||
do_assert_init(out, extra_indent_level,is_constructor);
|
||||
indent(out,extra_indent_level) << "return Py_BuildValue(\"\");\n";
|
||||
|
||||
@ -2723,6 +2723,10 @@ write_function_instance(ostream &out, InterfaceMaker::Object *obj,
|
||||
if (!is_inplace) {
|
||||
return_expr = manage_return_value(out, extra_indent_level, remap, "return_value");
|
||||
}
|
||||
if (coercion_possible) {
|
||||
indent(out, extra_indent_level)
|
||||
<< "Py_XDECREF(coerced);\n";
|
||||
}
|
||||
do_assert_init(out, extra_indent_level,is_constructor);
|
||||
pack_return_value(out, extra_indent_level, remap, remap->_return_type->temporary_to_return(return_expr),ForwardDeclrs,is_inplace);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user