Fix #2957375 (C#) - SWIGStringHelper and SWIGExceptionHelper not always being initialized before use in .NET 4 as the intermediary class was not marked as beforefieldinit.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12044 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a363a0361b
commit
a4febe7799
2 changed files with 24 additions and 0 deletions
|
|
@ -319,6 +319,14 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterStringCallback_$module(SWIG_CSharpString
|
|||
%}
|
||||
#endif // SWIG_CSHARP_NO_STRING_HELPER
|
||||
|
||||
#if !defined(SWIG_CSHARP_NO_IMCLASS_STATIC_CONSTRUCTOR)
|
||||
// Ensure the class is not marked beforefieldinit
|
||||
%pragma(csharp) imclasscode=%{
|
||||
static $imclassname() {
|
||||
}
|
||||
%}
|
||||
#endif
|
||||
|
||||
%insert(runtime) %{
|
||||
/* Contract support */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue