helly           Sat Jan  3 19:02:07 2009 UTC

  Modified files:              
    /php-src/ext/reflection     php_reflection.c 
  Log:
  - Add ReflectionFunctionAbstract::getClosureThis()
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.333&r2=1.334&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.333 
php-src/ext/reflection/php_reflection.c:1.334
--- php-src/ext/reflection/php_reflection.c:1.333       Sat Jan  3 14:20:07 2009
+++ php-src/ext/reflection/php_reflection.c     Sat Jan  3 19:02:06 2009
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_reflection.c,v 1.333 2009/01/03 14:20:07 helly Exp $ */
+/* $Id: php_reflection.c,v 1.334 2009/01/03 19:02:06 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1585,6 +1585,19 @@
 }
 /* }}} */
 
+/* {{{ proto public bool ReflectionFunction::getClosureThis() U
+   Returns this pointer bound to closure */
+ZEND_METHOD(reflection_function, getClosureThis)
+{
+       reflection_object *intern;
+       zend_function *fptr;
+
+       METHOD_NOTSTATIC_NUMPARAMS(reflection_function_abstract_ptr, 0);
+       GET_REFLECTION_OBJECT_PTR(fptr);
+       RETURN_ZVAL(intern->obj, 1, 0);
+}
+/* }}} */
+
 /* {{{ proto public bool ReflectionFunction::isInternal() U
    Returns whether this is an internal function */
 ZEND_METHOD(reflection_function, isInternal)
@@ -5106,25 +5119,26 @@
 static const zend_function_entry reflection_function_abstract_functions[] = {
        ZEND_ME(reflection, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
        PHP_ABSTRACT_ME(reflection_function, __toString, NULL)
+       ZEND_ME(reflection_function, inNamespace, NULL, 0)
        ZEND_ME(reflection_function, isClosure, NULL, 0)
+       ZEND_ME(reflection_function, isDeprecated, NULL, 0)
        ZEND_ME(reflection_function, isInternal, NULL, 0)
        ZEND_ME(reflection_function, isUserDefined, NULL, 0)
-       ZEND_ME(reflection_function, getName, NULL, 0)
-       ZEND_ME(reflection_function, getFileName, NULL, 0)
-       ZEND_ME(reflection_function, getStartLine, NULL, 0)
-       ZEND_ME(reflection_function, getEndLine, NULL, 0)
+       ZEND_ME(reflection_function, getClosureThis, NULL, 0)
        ZEND_ME(reflection_function, getDocComment, NULL, 0)
-       ZEND_ME(reflection_function, getStaticVariables, NULL, 0)
-       ZEND_ME(reflection_function, returnsReference, NULL, 0)
-       ZEND_ME(reflection_function, getParameters, NULL, 0)
-       ZEND_ME(reflection_function, getNumberOfParameters, NULL, 0)
-       ZEND_ME(reflection_function, getNumberOfRequiredParameters, NULL, 0)
+       ZEND_ME(reflection_function, getEndLine, NULL, 0)
        ZEND_ME(reflection_function, getExtension, NULL, 0)
        ZEND_ME(reflection_function, getExtensionName, NULL, 0)
-       ZEND_ME(reflection_function, isDeprecated, NULL, 0)
-       ZEND_ME(reflection_function, inNamespace, NULL, 0)
+       ZEND_ME(reflection_function, getFileName, NULL, 0)
+       ZEND_ME(reflection_function, getName, NULL, 0)
        ZEND_ME(reflection_function, getNamespaceName, NULL, 0)
+       ZEND_ME(reflection_function, getNumberOfParameters, NULL, 0)
+       ZEND_ME(reflection_function, getNumberOfRequiredParameters, NULL, 0)
+       ZEND_ME(reflection_function, getParameters, NULL, 0)
        ZEND_ME(reflection_function, getShortName, NULL, 0)
+       ZEND_ME(reflection_function, getStartLine, NULL, 0)
+       ZEND_ME(reflection_function, getStaticVariables, NULL, 0)
+       ZEND_ME(reflection_function, returnsReference, NULL, 0)
        {NULL, NULL, NULL}
 };
 
@@ -5532,7 +5546,7 @@
        php_info_print_table_start();
        php_info_print_table_header(2, "Reflection", "enabled");
 
-       php_info_print_table_row(2, "Version", "$Revision: 1.333 $");
+       php_info_print_table_row(2, "Version", "$Revision: 1.334 $");
 
        php_info_print_table_end();
 } /* }}} */
@@ -5546,7 +5560,7 @@
        NULL,
        NULL,
        PHP_MINFO(reflection),
-       "$Revision: 1.333 $",
+       "$Revision: 1.334 $",
        STANDARD_MODULE_PROPERTIES
 }; /* }}} */
 



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

Reply via email to