octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #49712] Cannot unload oct file from a SWIG gen


From: anonymous
Subject: [Octave-bug-tracker] [bug #49712] Cannot unload oct file from a SWIG generated wrapper
Date: Sun, 27 Nov 2016 15:05:46 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0

Follow-up Comment #4, bug #49712 (project octave):

Hi John,

Thanks for your answer, but my issue is slightly different. Indeed, your
explanations match my understanding of the documentation, which mentions the
'autoload' syntax and the symlink approach.
Both work for me, and I have no trouble reproducing the example you posted
(either by using 'autoload' as you did, or by creating a symlink
'myotherfun.oct' pointing to 'myfun.oct')

The issue raises when I use swig. When I load a oct module based on a swig
wrapper, then I cannot unload it.

As described in my post below, the only way I found so far to call some code
from the library while still by able to unload it is to use the symlink
approach (I did not try the 'autoload', but I expect it to work).
By doing so, I can call from Octave a function defined in the oct library
(based on a swig wrapper) and in this specific case Octave unloads the library
properly.
On the contrary, if I directly load the compiled oct, I cannot unload the oct
library.

However, if I want to create a wrapped C++ class from Octave or if the wrapped
function returns a class, I could not get it working without loading directly
the oct file.
When using a symlink, if the function returns a wrapped class, Octave crashes
when I try to call it.
If I want to create a wrapped class from Octave, I even don't know how to
proceed with symlinks.

So, I wonder if there is a way to unload a swig based oct library. I have
trouble extending the autoload/symlink approach while keeping the wrapper
fully functional. And I understand that a oct with multiple functions defined
may cause some unloading issues.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49712>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]