[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: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #49712] Cannot unload oct file from a SWIG generated wrapper |
Date: |
Sun, 27 Nov 2016 13:09:13 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
Follow-up Comment #3, bug #49712 (project octave):
If your .oct file defines multiple functions, then Octave will only unload the
.oct file if all the functions defined in the .oct file are cleared. You
should be able to do that by clearing them individually or by using "clear
functions".
At least that works for me with a .oct file generated from
#include <iostream>
#include <octave/oct.h>
DEFUN_DLD (myfun, , , "")
{
static double foo = 0.0;
foo += 1.0;
return ovl (foo);
}
DEFUN_DLD (myotherfun, , , "")
{
return ovl ("foobar!");
}
octave:1> mkoctfile myfun.cc
octave:2> autoload ("myotherfun", "/home/jwe/myfun.oct")
octave:3> myotherfun
ans = foobar!
octave:4> myfun
ans = 1
octave:5> myfun
ans = 2
octave:6> clear functions
octave:7> myfun
ans = 1
octave:8> myotherfun
ans = foobar!
octave:9> clear myfun
octave:10> myfun
ans = 2
octave:11> clear myfun myotherfun
octave:12> myfun
ans = 1
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49712>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/