Fixes for Visual C++ for C++ code

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10111 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2007-11-11 21:48:25 +00:00
commit 3f567de7ba

View file

@ -811,8 +811,16 @@ int R::top(Node *n) {
Printf(s_init, "# This is an automatically generate file by the R module for SWIG.\n\n");
outputCommandLineArguments(s_init);
Printf(f_wrapper, "#ifdef __cplusplus\n");
Printf(f_wrapper, "extern \"C\" {\n");
Printf(f_wrapper, "#endif\n\n");
Language::top(n);
Printf(f_wrapper, "#ifdef __cplusplus\n");
Printf(f_wrapper, "}\n");
Printf(f_wrapper, "#endif\n");
String *type_table = NewString("");
SwigType_emit_type_table(f_runtime,f_wrapper);
Delete(type_table);
@ -827,7 +835,6 @@ int R::top(Node *n) {
if(registrationTable)
outputRegistrationRoutines(f_init);
/* Now arrange to write the 2 files - .S and .c. */
DumpCode(n, module);