Skip to content

Commit

Permalink
Merge pull request #5946 from bragef/master
Browse files Browse the repository at this point in the history
Include mserror.i and call msSetup() for PHP7 Swig mapscript
  • Loading branch information
jmckenna committed Dec 12, 2019
2 parents 33daf4b + 730e2cc commit b64932c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mapscript/mapscript.i
Expand Up @@ -197,7 +197,7 @@ typedef struct {
============================================================================
*/

#if defined(SWIGCSHARP) || defined(SWIGJAVA) || defined(SWIGRUBY)
#if defined(SWIGCSHARP) || defined(SWIGJAVA) || defined(SWIGRUBY) || defined(SWIGPHP7)
%include "../mserror.i"
#endif

Expand Down
17 changes: 17 additions & 0 deletions mapscript/phpng/php7module.i
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 b64932c

Please sign in to comment.