static ZEND_MINIT_FUNCTION(zend_accelerator) { (void)type; /* keep the compiler happy */ REGISTER_INI_ENTRIES(); #if ZEND_EXTENSION_API_NO < PHP_5_3_X_API_NO zend_set_user_opcode_handler(ZEND_DECLARE_INHERITED_CLASS_DELAYED, ZEND_DECLARE_INHERITED_CLASS_DELAYED_HANDLER); #endif return SUCCESS; }
static ZEND_MINIT_FUNCTION(zend_accelerator) { (void)type; /* keep the compiler happy */ /* must be 0 before the ini entry OnUpdate function is called */ accel_blacklist.entries = NULL; REGISTER_INI_ENTRIES(); #if ZEND_EXTENSION_API_NO < PHP_5_3_X_API_NO zend_set_user_opcode_handler(ZEND_DECLARE_INHERITED_CLASS_DELAYED, ZEND_DECLARE_INHERITED_CLASS_DELAYED_HANDLER); #endif return SUCCESS; }
void swoole_coroutine_util_init(int module_number TSRMLS_DC) { SWOOLE_INIT_CLASS_ENTRY(swoole_coroutine_util_ce, "swoole_coroutine", "Swoole\\Coroutine", swoole_coroutine_util_methods); swoole_coroutine_util_class_entry_ptr = zend_register_internal_class(&swoole_coroutine_util_ce TSRMLS_CC); INIT_CLASS_ENTRY(swoole_coroutine_iterator_ce, "Swoole\\Coroutine\\Iterator", iterator_methods); swoole_coroutine_iterator_class_entry_ptr = zend_register_internal_class(&swoole_coroutine_iterator_ce TSRMLS_CC); zend_class_implements(swoole_coroutine_iterator_class_entry_ptr TSRMLS_CC, 1, zend_ce_iterator); #ifdef SW_HAVE_COUNTABLE zend_class_implements(swoole_coroutine_iterator_class_entry_ptr TSRMLS_CC, 1, zend_ce_countable); #endif if (SWOOLE_G(use_namespace)) { sw_zend_register_class_alias("swoole_coroutine", swoole_coroutine_util_class_entry_ptr); } else { sw_zend_register_class_alias("Swoole\\Coroutine", swoole_coroutine_util_class_entry_ptr); } if (SWOOLE_G(use_shortname)) { sw_zend_register_class_alias("Co", swoole_coroutine_util_class_entry_ptr); } defer_coros = swHashMap_new(SW_HASHMAP_INIT_BUCKET_N, NULL); //prohibit exit in coroutine INIT_CLASS_ENTRY(swoole_exit_exception_ce, "Swoole\\ExitException", swoole_exit_exception_methods); swoole_exit_exception_class_entry_ptr = zend_register_internal_class_ex(&swoole_exit_exception_ce, zend_exception_get_default()); SWOOLE_DEFINE(EXIT_IN_COROUTINE); SWOOLE_DEFINE(EXIT_IN_SERVER); if (SWOOLE_G(cli)) { ori_exit_handler = zend_get_user_opcode_handler(ZEND_EXIT); zend_set_user_opcode_handler(ZEND_EXIT, coro_exit_handler); } }
static void smd_register_handlers() /* {{{ */ { zend_set_user_opcode_handler(ZEND_ISSET_ISEMPTY_DIM_OBJ, smd_fetch_dim_handler); zend_set_user_opcode_handler(ZEND_FETCH_DIM_R, smd_fetch_dim_handler); } /* }}} */