* New test case tests that %attribute macros correctly supports passing
template with multiple parameters as class name or attribute type name
* Some further changes were made to %attribute macros - now
AttributeType is protected with %arg as well. This allows you
to have attributes of type e.g. std::pair<int,int> etc
Update CHANGES file for %attribute template fixes
Closes#48
- once installed, Octave functions can never really be uninstalled
(clear -f doesn't prevent the function being called again), so
it makes no sense to install functions more than once
- this can lead to a significant speed-up of module loading times,
up to a factor of 10 for a large module loaded multiple times
- this introduces a memory leak, which becomes significant for large
modules (many global variables) and many module re-loadings (e.g.
during a long-running script)
- the original motivation was to prevent double-frees on exit, but this
problem appears to have been fixed by the _Exit() hack in later commits,
and in any case is an issue only for Octave ~3.2, so it should be safe to
remove; tested by running Octave examples/test suite with Debian 3.2.4 and
built-from-source 3.2.4, 3.4.3, and 3.6.3
On 19/04/13 18:41, Geert Janssens wrote:
> Hi,
>
> I'm working through the failing testcases for guile. One testcase fails
> with a compilation error in some generated code based on std_map and
> std_pair. I know exactly where this generated code comes from, but my
> C++ knowledge is insufficient to understand the error, let alone remedy
> it. I gather some kind of const violation, but that's all I can read
> from it :( My hope is that someone used to working with stl will more
> easily understand it.
>
> So, if someone can help me understand the error and what the fix would
> be in C++, I can fix the corresponding .i file.
>
> This is the code snippet the causes the error:
>
<snip>
>
> /usr/lib/gcc/i686-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_pair.h:88:12:
> error: non-static const member ‘const std::pair<int, A*> std::pair<int,
> const std::pair<int, A*> >::second’, can’t use default assignment operator
This is the main problem - it is saying there is no default assignment
operator (because one of the members in pair is const). The solution is
to avoid assignment. I've attached a patch to do this plus some error
message corrections.
William
All of guile's interface files now use the scm interface.
This should not affect any users. Swig generated code
using the scm interface can be mixed with gh interface
using user code.
It does simplify maintenance of the guile swig code though.
'rubycontainer_extended.swg' generates warnings:
Warning 322: Redundant redeclaration of 'map_bang',
Warning 322: previous declaration of 'map_bang'.
The fix is to remove a redundant call to swig_container_extend for
swig::GC_VALUE.
Thanks
========================================================
SF Bug#1292 - Runtime fixes for Proc changes in ruby-1.9 when using STL wrappers that override the default predicate, such as:
%template(Map) std::map<swig::LANGUAGE_OBJ, swig::LANGUAGE_OBJ, swig::BinaryPredicate<> >;
Fixes li_std_functors testcases for Ruby 1.9.
Also rb_respond_to return values have changed subtely in 1.9 and return should be treated as a flag instead of checking for Qtrue, see SF Bug #1159.
Also fix li_std_map, li_std_set silently failing - rb_protect behaviour seems to have changed when an exception is thrown, so code has been changed to use rb_rescue. A call to 'rb_set_errinfo(Qnil)' could have solved this after the rb_protect call, but it is only available in 1.9+ and Ruby API changes are not easily and transparently detectable.
* Change the name of the memory own variable for base java director classes to match that expected by the director code
* Add conditional to appropriately dynamically cast director classes wrapped in smart pointers.