diff options
Diffstat (limited to 'Zend/zend_generators.c')
-rw-r--r-- | Zend/zend_generators.c | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index 3c75b03004..d086892c3a 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -23,6 +23,7 @@ #include "zend_exceptions.h" #include "zend_generators.h" #include "zend_closures.h" +#include "zend_generators_arginfo.h" ZEND_API zend_class_entry *zend_ce_generator; ZEND_API zend_class_entry *zend_ce_ClosedGeneratorException; @@ -307,9 +308,9 @@ static uint32_t calc_gc_buffer_size(zend_generator *generator) /* {{{ */ } /* }}} */ -static HashTable *zend_generator_get_gc(zval *object, zval **table, int *n) /* {{{ */ +static HashTable *zend_generator_get_gc(zend_object *object, zval **table, int *n) /* {{{ */ { - zend_generator *generator = (zend_generator*) Z_OBJ_P(object); + zend_generator *generator = (zend_generator*)object; zend_execute_data *execute_data = generator->execute_data; zend_op_array *op_array; zval *gc_buffer; @@ -1012,7 +1013,7 @@ ZEND_METHOD(Generator, throw) zend_generator *generator; ZEND_PARSE_PARAMETERS_START(1, 1) - Z_PARAM_ZVAL(exception) + Z_PARAM_OBJECT_OF_CLASS(exception, zend_ce_throwable); ZEND_PARSE_PARAMETERS_END(); Z_TRY_ADDREF_P(exception); @@ -1177,26 +1178,15 @@ zend_object_iterator *zend_generator_get_iterator(zend_class_entry *ce, zval *ob } /* }}} */ -ZEND_BEGIN_ARG_INFO(arginfo_generator_void, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_generator_send, 0, 0, 1) - ZEND_ARG_INFO(0, value) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_generator_throw, 0, 0, 1) - ZEND_ARG_INFO(0, exception) -ZEND_END_ARG_INFO() - static const zend_function_entry generator_functions[] = { - ZEND_ME(Generator, rewind, arginfo_generator_void, ZEND_ACC_PUBLIC) - ZEND_ME(Generator, valid, arginfo_generator_void, ZEND_ACC_PUBLIC) - ZEND_ME(Generator, current, arginfo_generator_void, ZEND_ACC_PUBLIC) - ZEND_ME(Generator, key, arginfo_generator_void, ZEND_ACC_PUBLIC) - ZEND_ME(Generator, next, arginfo_generator_void, ZEND_ACC_PUBLIC) - ZEND_ME(Generator, send, arginfo_generator_send, ZEND_ACC_PUBLIC) - ZEND_ME(Generator, throw, arginfo_generator_throw, ZEND_ACC_PUBLIC) - ZEND_ME(Generator, getReturn,arginfo_generator_void, ZEND_ACC_PUBLIC) + ZEND_ME(Generator, rewind, arginfo_class_Generator_rewind, ZEND_ACC_PUBLIC) + ZEND_ME(Generator, valid, arginfo_class_Generator_valid, ZEND_ACC_PUBLIC) + ZEND_ME(Generator, current, arginfo_class_Generator_current, ZEND_ACC_PUBLIC) + ZEND_ME(Generator, key, arginfo_class_Generator_key, ZEND_ACC_PUBLIC) + ZEND_ME(Generator, next, arginfo_class_Generator_next, ZEND_ACC_PUBLIC) + ZEND_ME(Generator, send, arginfo_class_Generator_send, ZEND_ACC_PUBLIC) + ZEND_ME(Generator, throw, arginfo_class_Generator_throw, ZEND_ACC_PUBLIC) + ZEND_ME(Generator, getReturn,arginfo_class_Generator_getReturn, ZEND_ACC_PUBLIC) ZEND_FE_END }; |