Skip to content
Permalink
Browse files

[Backport] Include mserror.i and call msSetup() for PHP7 Swig mapscript

  • Loading branch information
jmckenna committed Dec 13, 2019
1 parent 224abe7 commit 208d3d94d81dc1dc8f2cc0e0f666511df454ad1d
Showing with 24 additions and 1 deletion.
  1. +7 −1 mapscript/mapscript.i
  2. +17 −0 mapscript/phpng/php7module.i
@@ -30,6 +30,12 @@
============================================================================
*/

%begin %{
#ifdef _MSC_VER
#define SWIG_PYTHON_INTERPRETER_NO_DEBUG
#endif
%}

#ifndef SWIGPHPNG
%module mapscript
#else
@@ -191,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

@@ -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 208d3d9

Please sign in to comment.
You can’t perform that action at this time.