Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Swig 3.0.5 #39

Merged
merged 2 commits into from
Jan 25, 2016
Merged

Conversation

abicky
Copy link
Contributor

@abicky abicky commented Apr 11, 2015

This commit will fix the error like below with Swig 3.0.5 (I have confirmed on Mac OS 10.10.2 and Debian 6.0.5) mentioned in Stackoverflow:

% cd swig/python
% ./prepare.sh --swig
/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/std/std_vector.i:87: Error: Can't copy typemap (directorout) std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > = std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > &DIRECTOROUT
/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/std/std_vector.i:87: Error: Can't copy typemap (in) std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > *INPUT = std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > *INOUT
/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/std/std_vector.i:87: Error: Can't copy typemap (in) std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > &INPUT = std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > &INOUT
/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/std/std_vector.i:87: Error: Can't copy typemap (typecheck) std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > *INPUT = std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > *INOUT
/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/std/std_vector.i:87: Error: Can't copy typemap (typecheck) std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > &INPUT = std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > &INOUT
/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/std/std_vector.i:87: Error: Can't copy typemap (argout) std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > *OUTPUT = std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > *INOUT
/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/std/std_vector.i:87: Error: Can't copy typemap (argout) std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > &OUTPUT = std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > &INOUT
/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/std/std_vector.i:87: Error: Can't copy typemap (typecheck) std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > *INPUT = std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > *INOUT
/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/std/std_vector.i:87: Error: Can't copy typemap (typecheck) std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > &INPUT = std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > &INOUT
/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/std/std_vector.i:87: Error: Can't copy typemap (freearg) std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > *INPUT = std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > *INOUT
/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/std/std_vector.i:87: Error: Can't copy typemap (freearg) std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > &INPUT = std::vector< CRFSuite::Item,std::allocator< CRFSuite::Item > > &INOUT

It also will fix the error like below with Swig 2.0.4 mentioned in README for Python binding:

export_wrap.cpp:5020: error: redefinition of ‘struct swig::traits<std::vector<CRFSuite::Attribute, std::allocator<CRFSuite::Attribute> > >’
export_wrap.cpp:4919: error: previous definition of ‘struct swig::traits<std::vector<CRFSuite::Attribute, std::allocator<CRFSuite::Attribute> > >’

chokkan pushed a commit that referenced this pull request Jan 25, 2016
@chokkan chokkan merged commit cbcd9f3 into chokkan:master Jan 25, 2016
@chokkan
Copy link
Owner

chokkan commented Jan 25, 2016

Thank you for sending this patch. I could confirm this works on both swig 2.x and 3.x.

@abicky abicky deleted the feature/support-swig-3.0.5 branch October 3, 2016 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants