Added support for %minit, %mshutdown, %rinit, %rshutdown user supplied code.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7401 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Kevin Ruland 2005-08-29 11:28:56 +00:00
commit cce19f492a
2 changed files with 28 additions and 7 deletions

View file

@ -13,9 +13,23 @@
%include "globalvar.i" // Global variables.
%include "const.i"
// use %init %{ "/*code goes here*/ " %}
// or %minit %{ "/* code goes here*/ " %} to
// insert code in the PHP_MINIT_FUNCTION
#define %minit %insert("init")
// use %rinit %{ "/* code goes here*/ " %} to
// insert code in the PHP_RINIT_FUNCTION
#define %rinit %insert("rinit")
// use %shutdown %{ " /*code goes here*/ " %} to
// insert code in the PHP_MSHUTDOWN_FUNCTION
#define %shutdown %insert("shutdown")
#define %mshutdown %insert("shutdown")
// use %rshutdown %{ " /*code goes here*/" %} to
// insert code in the PHP_RSHUTDOWN_FUNCTION
#define %rshutdown %insert("rshutdown")
/* Typemaps for input parameters by value */