phpinit.swg 706 B

12345678910111213141516171819202122232425
  1. /* ------------------------------------------------------------
  2. * The start of the PHP initialization function
  3. * ------------------------------------------------------------ */
  4. %insert(init) "swiginit.swg"
  5. %init %{
  6. SWIG_php_minit {
  7. SWIG_InitializeModule(0);
  8. %}
  9. %fragment("swig_php_init_member_ptr2", "header") {
  10. #define SWIG_MEMBER_PTR ((char*)"CLASS::*")
  11. static void swig_member_ptr_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) {
  12. efree(rsrc->ptr);
  13. }
  14. static int swig_member_ptr = 0;
  15. }
  16. %fragment("swig_php_init_member_ptr", "init", fragment="swig_php_init_member_ptr2") {
  17. swig_member_ptr = zend_register_list_destructors_ex(swig_member_ptr_dtor, NULL, SWIG_MEMBER_PTR, module_number);
  18. }