Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#177 Fix compile error when creating long error message

closed-accepted
nobody
None
5
2007-09-18
2007-05-22
Casey Raymondson
No

This patch fixes the bug described in bug 1630855 (https://sourceforge.net/tracker/?func=detail&aid=1630855&group_id=1645&atid=101645).

When SWIG creates a NotImplementedError for overloaded functions, it includes a list of available function prototypes in the error message string. If the number of prototypes is very large, it is possible for the string literal for this message in the generated C++ code to exceed 2048 characters. Visual C++ .NET 2003 is unable to compile code containing a string literal of this length. It halts compilation with an Error C2026 if it encounters such a string. This problem has been encountered when wrapping for both Python and Java.

This patch separates the string into multiple, shorter literals in the generated C++ code. The compiler is now able to compile such code correctly.

Discussion

  • Patch for long error messages

     
  • Olly Betts
    Olly Betts
    2007-09-18

    • status: open --> closed-accepted
     
  • Olly Betts
    Olly Betts
    2007-09-18

    Logged In: YES
    user_id=14972
    Originator: NO

    Thanks for your patch - I've applied it to SVN.