Update csharp.cxx

When people use the -namespace option, they often intend for the input to swig to wrap a particular namespace in a single module. This option should also have an effect on how C++ wrapper function names are mangled, and not just the C# proxy code.
This commit is contained in:
Johan Gustavsson 2016-02-04 19:34:19 +01:00 • committed by William S Fulton
commit 1458326f4c

View file

@ -415,8 +415,16 @@ public:
}
Printf(f_runtime, "\n");
if (namespce) {
String *wrapper_name = NewStringf("");
Printf(wrapper_name, "CSharp_%s_%%f", namespce);
Swig_name_register("wrapper", wrapper_name);
Delete(wrapper_name);
}
else {
Swig_name_register("wrapper", "CSharp_%f");
}
Swig_name_register("wrapper", "CSharp_%f");
if (old_variable_names) {
Swig_name_register("set", "set_%n%v");
Swig_name_register("get", "get_%n%v");