Ticket #488: php-generated-code-director-fix.patch

File php-generated-code-director-fix.patch, 899 bytes (added by Olly Betts, 13 years ago)

Example of the changes we want to make to the generated code

  • php5/

    old new  
    740740#include "zend.h"
    741741#include "zend_API.h"
    742742#include "zend_exceptions.h"
     743#include "zend_interfaces.h"
    743744#include "php.h"
    744745#include "ext/standard/php_string.h"
    745746
     
    22662267 
    22672268  SWIG_SetPointerZval(&obj0, (void *)&doc, SWIGTYPE_p_Xapian__Document, 0);
    22682269 
     2270  zval wrap0;
     2271  zend_class_entry **ce;
     2272  if (zend_lookup_class("xapiandocument", sizeof("xapiandocument") - 1, &ce TSRMLS_CC) == SUCCESS) {
     2273    INIT_ZVAL(wrap0);
     2274    object_init_ex(&wrap0, *ce);
     2275    zval * p_wrap0 = &wrap0;
     2276    zend_call_method_with_1_params(&p_wrap0, *ce, &(*ce)->constructor, "__construct", NULL, &obj0);
     2277    args[0] = &wrap0;
     2278  }
     2279
    22692280  call_user_function(EG(function_table), (zval**)&swig_self, &funcname,
    22702281    result, 1, args TSRMLS_CC);
    22712282