dmitry          Fri Jul 25 09:44:47 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/pdo    pdo_stmt.c 
    /php-src/ext/reflection     php_reflection.c 
  Log:
  Fixed support for static methods
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.38.2.24.2.19&r2=1.118.2.38.2.24.2.20&diff_format=u
Index: php-src/ext/pdo/pdo_stmt.c
diff -u php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.19 
php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.20
--- php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.19     Fri Jul 25 08:45:09 2008
+++ php-src/ext/pdo/pdo_stmt.c  Fri Jul 25 09:44:47 2008
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: pdo_stmt.c,v 1.118.2.38.2.24.2.19 2008/07/25 08:45:09 tony2001 Exp $ */
+/* $Id: pdo_stmt.c,v 1.118.2.38.2.24.2.20 2008/07/25 09:44:47 dmitry Exp $ */
 
 /* The PDO Statement Handle Class */
 
@@ -860,7 +860,7 @@
        fcc->initialized = 1;
        fcc->function_handler = function_handler;
        fcc->calling_scope = EG(scope);
-       fcc->called_scope = Z_OBJCE_PP(object);
+       fcc->called_scope = object ? Z_OBJCE_PP(object) : NULL;
        fcc->object_pp = object;
        
        return 1;
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.45.2.24&r2=1.164.2.33.2.45.2.25&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.24 
php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.25
--- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.24        Fri Jul 
25 08:50:55 2008
+++ php-src/ext/reflection/php_reflection.c     Fri Jul 25 09:44:47 2008
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.24 2008/07/25 08:50:55 dmitry Exp 
$ */
+/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.25 2008/07/25 09:44:47 dmitry Exp 
$ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -2382,7 +2382,7 @@
         */
        if (mptr->common.fn_flags & ZEND_ACC_STATIC) {
                object_pp = NULL;
-               obj_ce = NULL;
+               obj_ce = mptr->common.scope;
        } else {
                if (Z_TYPE_PP(params[0]) != IS_OBJECT) {
                        efree(params);
@@ -2416,7 +2416,7 @@
        fcc.initialized = 1;
        fcc.function_handler = mptr;
        fcc.calling_scope = obj_ce;
-       fcc.called_scope = Z_OBJCE_PP(object_pp);
+       fcc.called_scope = obj_ce;
        fcc.object_pp = object_pp;
 
        result = zend_call_function(&fci, &fcc TSRMLS_CC);
@@ -2491,7 +2491,7 @@
         */
        if (mptr->common.fn_flags & ZEND_ACC_STATIC) {
                object = NULL;
-               obj_ce = NULL;
+               obj_ce = mptr->common.scope;
        } else {
                if (!object) {
                        efree(params);
@@ -2523,8 +2523,8 @@
        fcc.initialized = 1;
        fcc.function_handler = mptr;
        fcc.calling_scope = obj_ce;
-       fcc.called_scope = Z_OBJCE_P(object);
-       fcc.object_pp = &object;
+       fcc.called_scope = obj_ce;
+       fcc.object_pp = object ? &object : NULL;
 
        result = zend_call_function(&fci, &fcc TSRMLS_CC);
        
@@ -5117,7 +5117,7 @@
        php_info_print_table_start();
        php_info_print_table_header(2, "Reflection", "enabled");
 
-       php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 
1.164.2.33.2.45.2.24 2008/07/25 08:50:55 dmitry Exp $");
+       php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 
1.164.2.33.2.45.2.25 2008/07/25 09:44:47 dmitry Exp $");
 
        php_info_print_table_end();
 } /* }}} */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to