Fix static extern C compilation errors for Perl C++ wrappers

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10151 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2007-11-19 21:30:57 +00:00
commit 373e85a713
2 changed files with 5 additions and 0 deletions

View file

@ -1,6 +1,9 @@
Version 1.3.33 (in progress)
============================
11/19/2007: wsfulton
[Perl] Fix broken compilation of C++ wrappers on some compilers.
11/16/2007: olly
[Python] Don't pass Py_ssize_t for a %d printf-like format as
that's undefined behaviour when sizeof(Py_ssize_t) != sizeof(int).

View file

@ -304,6 +304,7 @@ public:
/* Start creating magic code */
Printv(magic,
"#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n",
"#ifdef PERL_OBJECT\n",
"#define MAGIC_CLASS _wrap_", module, "_var::\n",
"class _wrap_", module, "_var : public CPerlObj {\n",
@ -324,6 +325,7 @@ public:
/* Dump out variable wrappers */
Printv(magic, "\n\n#ifdef PERL_OBJECT\n", "};\n", "#endif\n", NIL);
Printv(magic, "\n#ifdef __cplusplus\n}\n#endif\n", NIL);
Printf(f_header, "%s\n", magic);