X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_exception.c;h=2ce163a01292fb82f7bef996ac0d87d217c303a6;hp=cd5dcfe7b2c4a3b8bb877d1584f553286e835253;hb=18750f34ec9a9b16ffd07f54346136ca0f72e9a8;hpb=eebe0f3e8947ecb407451d20aef0611cfcedfdac diff --git a/php_http_exception.c b/php_http_exception.c index cd5dcfe..2ce163a 100644 --- a/php_http_exception.c +++ b/php_http_exception.c @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2011, Michael Wallner | + | Copyright (c) 2004-2013, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -18,12 +18,6 @@ # define PHP_HTTP_DBG_EXCEPTIONS 0 #endif -zend_class_entry *php_http_exception_class_entry; - -zend_function_entry php_http_exception_method_entry[] = { - EMPTY_FUNCTION_ENTRY -}; - #if PHP_HTTP_DBG_EXCEPTIONS static void php_http_exception_hook(zval *ex TSRMLS_DC) { @@ -36,9 +30,14 @@ static void php_http_exception_hook(zval *ex TSRMLS_DC) } #endif +zend_class_entry *php_http_exception_class_entry; + PHP_MINIT_FUNCTION(http_exception) { - PHP_HTTP_REGISTER_EXCEPTION(Exception, php_http_exception_class_entry, zend_exception_get_default(TSRMLS_C)); + zend_class_entry ce = {0}; + + INIT_NS_CLASS_ENTRY(ce, "http", "Exception", NULL); + php_http_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC); zend_declare_class_constant_long(php_http_exception_class_entry, ZEND_STRL("E_UNKNOWN"), PHP_HTTP_E_UNKNOWN TSRMLS_CC); zend_declare_class_constant_long(php_http_exception_class_entry, ZEND_STRL("E_RUNTIME"), PHP_HTTP_E_RUNTIME TSRMLS_CC);