From: SourceForge.net <no...@so...> - 2011-02-18 06:49:39
|
Bugs item #3166793, was opened at 2011-01-28 12:24 Message generated for change (Comment added) made by olly You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=3166793&group_id=1645 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: php Group: None >Status: Closed >Resolution: Works For Me Priority: 5 Private: No Submitted By: Jay Buffington (jaybuffington) Assigned to: Olly Betts (olly) Summary: php proxy class + overloading + std_vector.i causes segfault Initial Comment: $ cat example.i %module example %include "std_vector.i" %include "std_string.i" namespace std { %template(StringVector) vector<std::string>; } %include example.h ----------------------------------------- $ cat example.h #include <string> #include <vector> class Job { public: void arguments( const std::vector<std::string> & args ); const std::vector<std::string> & arguments() const; }; ----------------------------------------- $ swig -php -cppext cxx -c++ -o example_wrap.cc example.i Segmentation fault $ swig -noproxy -php -cppext cxx -c++ -o example_wrap.cc example.i $ Note that if I rename one of my functions the segfault goes away. Also, using vector<int> works, but vector<std::string> does not. ---------------------------------------------------------------------- >Comment By: Olly Betts (olly) Date: 2011-02-18 19:49 Message: This works for me in SVN trunk. I assumed at first it was fixed by r12471 (which is at least superficially similar, and the reason i was testing this bug): https://sourceforge.net/tracker/index.php?func=detail&aid=3168531&group_id=1645&atid=101645 However undoing that fix I find SWIG doesn't segfault for me either. I guess this must have been fixed by another recent change - closing as "works for me" for now, but please reopen if you can reproduce this with current SVN trunk, or with SWIG 2.0.2 once that is released. ---------------------------------------------------------------------- Comment By: Jay Buffington (jaybuffington) Date: 2011-01-28 12:24 Message: I should have mentioned this is swig 2.0.1 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=3166793&group_id=1645 |