Skip to content

Commit

Permalink
Add msSetup()/msCleanup() to SWIG PHP Mapscript
Browse files Browse the repository at this point in the history
  • Loading branch information
bragef committed Dec 12, 2019
1 parent a64b324 commit 730e2cc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions mapscript/phpng/php7module.i
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,20 @@
if( $1.owns_data )
msFree($1.data);
}


/* Module initialization: call msSetup() and register msCleanup() */
%init %{
if (msSetup() != MS_SUCCESS)
{
msSetError(MS_MISCERR, "Failed to set up threads and font cache",
"msSetup()");
}

%}

%mshutdown {
msCleanup();
}


0 comments on commit 730e2cc

Please sign in to comment.