Add support for SWIG2_CSHARP macro to create SWIG 2 backwards compatability mode.
This commit is contained in:
parent
adb93980f2
commit
3720b48847
3 changed files with 68 additions and 0 deletions
|
|
@ -11,6 +11,24 @@
|
|||
* The imtype typemap contains the C# type used in the intermediary class.
|
||||
* The cstype typemap contains the C# type used in the C# proxy classes, type wrapper classes and module class. */
|
||||
|
||||
/* SWIG 3 no longer inserts using directives into generated C# code. For backwards compatability, the SWIG2_CSHARP
|
||||
macro can be defined to have SWIG 3 generate using directives similar to those generated by SWIG 2. */
|
||||
#ifdef SWIG2_CSHARP
|
||||
|
||||
%typemap(csimports) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE &&, SWIGTYPE [], SWIGTYPE (CLASS::*) "\nusing global::System;\nusing global::System.Runtime.InteropServices;\n"
|
||||
|
||||
%pragma(csharp) moduleimports=%{
|
||||
using global::System;
|
||||
using global::System.Runtime.InteropServices;
|
||||
%}
|
||||
|
||||
%pragma(csharp) imclassimports=%{
|
||||
using global::System;
|
||||
using global::System.Runtime.InteropServices;
|
||||
%}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Fragments */
|
||||
%fragment("SWIG_PackData", "header") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue