From: SourceForge.net <no...@so...> - 2009-04-07 22:12:09
|
Bugs item #2741993, was opened at 2009-04-07 22:12 Message generated for change (Tracker Item Submitted) made by roblovski You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=2741993&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: code generation (general) Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Roblovski (roblovski) Assigned to: Nobody/Anonymous (nobody) Summary: swig tries to call private constructor Initial Comment: In this test case, SWIG will generate a setter for Three::m called _wrap_Three_m_set, which tries to call Two's copy constructor (which is private). If you change "Two m;" to "One m;" SWIG behaves correctly and doesn't generate the setter -- that extra level of inheritance seems to confuse it. Tested with SWIG 1.3.38 & Python. %module test; %inline { struct nocopy { nocopy() {} private: nocopy(const nocopy&); nocopy& operator=(const nocopy&); }; struct One: public nocopy {}; struct Two: public One {}; struct Three { Two m; }; } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=2741993&group_id=1645 |