Fix bug where module will segfault on load if it contains an object w/ the same name as the module.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10369 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
de6e25f3bb
commit
6878125b87
4 changed files with 20 additions and 1 deletions
|
|
@ -67,8 +67,12 @@ DEFUN_DLD (SWIG_name,args,nargout,SWIG_name_d) {
|
|||
|
||||
swig_install_ops(octave_swig_ref::static_type_id());
|
||||
|
||||
// the incref is necessary so install_global doesn't destroy module_ns,
|
||||
// as it would if it installed something with the same name as the module.
|
||||
module_ns->incref();
|
||||
if (global_option)
|
||||
module_ns->install_global();
|
||||
module_ns->decref();
|
||||
|
||||
return octave_value_list();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue