swig generates unusable ruby bindings

Bug #522874 reported by Roman Shtylman
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
swig
Unknown
Unknown
swig1.3 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: swig1.3

When generating ruby bindings withe the -minherit flag and STL vectors, the generated code is not usable with ruby.

When generating code with %template(some_name) std::vector<any_type>, the generated code will cause a segfault in registration with a NameError relating to "reject!" when run from ruby.

This was not a problem in previous versions of swig.

Revision history for this message
Roman Shtylman (shtylman) wrote :

Generate a library and then try to use it from ruby with this code and the -minherit flag will fail.

Revision history for this message
Roman Shtylman (shtylman) wrote :

patch to fix the bug

Revision history for this message
William Fulton (william-fultondesigns) wrote :

Applied patch for swig-2.0.0 upstream release:
http://swig.svn.sourceforge.net/viewvc/swig?view=rev&revision=11987

Changed in swig1.3 (Ubuntu):
status: New → Fix Committed
Artur Rona (ari-tczew)
tags: added: patch
Revision history for this message
Nigel Babu (nigelbabu) wrote :

Marking as patch-accepted-upstream since upstream has merged the patch.

tags: added: patch-accepted-upstream
removed: patch
Revision history for this message
Roman Shtylman (shtylman) wrote :

swig1.3 will not be patched with this. swig2.0 has this patch and is available.

Changed in swig1.3 (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.