Skip to content

Commit

Permalink
Ensure the class is not marked BeforeFieldInit causing memory corrupt…
Browse files Browse the repository at this point in the history
…ion with C#/CLR4 (#3438)

git-svn-id: http://svn.osgeo.org/mapserver/branches/branch-5-4@10442 7532c77e-422f-0410-93f4-f0b67bdd69e2
  • Loading branch information
szekerest committed Aug 5, 2010
1 parent e05166b commit bcdd86e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions HISTORY.TXT
Expand Up @@ -13,6 +13,8 @@ For a complete change history, please see the Subversion log comments.

Current Version:
----------------
- Ensure the class is not marked BeforeFieldInit causing memory corruption with C#/CLR4 (#3438)

- Fixed MSSQL2008 driver returning invalid extent (#3498)

- Backport the recent fixes in the MSSQL2008 driver (#3058, #3244)
Expand Down
2 changes: 1 addition & 1 deletion mapscript/csharp/Makefile.vc
Expand Up @@ -48,7 +48,7 @@ CSC = csc $(CSDEBUG)
!ENDIF

!IF $(MSVC_VER) >= 1600
CSC = $(CSC) /define:CLR4 /debug:full
CSC = $(CSC) /define:CLR4
!ENDIF

#SWIG = swig
Expand Down
6 changes: 6 additions & 0 deletions mapscript/csharp/swig_csharp_extensions.i
Expand Up @@ -29,6 +29,12 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/

// Ensure the class is not marked BeforeFieldInit causing memory corruption with CLR4
%pragma(csharp) imclasscode=%{
static $imclassname() {
}
%}

%typemap(csout, excode=SWIGEXCODE) SWIGTYPE {
$&csclassname ret = new $&csclassname($imcall, true, null);$excode
return ret;
Expand Down

0 comments on commit bcdd86e

Please sign in to comment.