[Kde-bindings] KDE/kdebindings/php/phpqt/src

Thomas Moenicke tm at php-qt.org
Sun Oct 12 11:32:45 UTC 2008


SVN commit 870326 by moenicke:

* the opcode handler for static method calls already knows the right class entry but doesn't forward it to the proxy method because there is no argument for it in the API,
the zval* this_ptr naturally doesn't exist for const calls. We put it on the context stack already when the opcode handler is called, it's then accessible via Context::activeCe()

CCMAIL: kde-bindings at kde.org



 M  +2 -12     php_qt.cpp  
 M  +1 -0      zend_handlers.cpp  


--- trunk/KDE/kdebindings/php/phpqt/src/php_qt.cpp #870325:870326
@@ -263,20 +263,10 @@
     zend_class_entry *ce;
     // nonstaticphp_qt_generic_class_proxyMethod
     if(getThis()){
-        // if a parent:: call occurs this_ptr has the wrong ce, so we need to
-        // correct it here
-        if( Context::parentCall() )
-        {
-            ce = Context::activeCe();
-            Context::setParentCall( false );
-        } else {
             ce = Z_OBJCE_P(getThis());
             Context::setActiveCe( ce );
-        }
-        // static
-    } else {
-        ce = Context::activeCe();
-    }
+    // static
+    } else ce = Context::activeCe();
 
     // find parents
     while (PQ::smoke()->idClass(ce->name).index <= 0) {
--- trunk/KDE/kdebindings/php/phpqt/src/zend_handlers.cpp #870325:870326
@@ -145,6 +145,7 @@
 {
     zend_op *opline = EX(opline);
     zend_class_entry *ce = EX_T(opline->op1.u.var).class_entry;
+    Context::setActiveCe( ce );
     union _zend_function *fbc;
     zval* function_name;
     char* function_name_strval;



More information about the Kde-bindings mailing list