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.
Log in to post a comment.