add http\Env\Url
[m6w6/ext-http] / src / php_http_header.c
index d4f2b510b311e69f3f2bde61fd6825f97ed81748..f31e0847e2f22dab40782a68211fb7310186b9c4 100644 (file)
@@ -116,6 +116,12 @@ zend_string *php_http_header_value_to_string(zval *header)
        }
 }
 
+static zend_class_entry *php_http_header_class_entry;
+zend_class_entry *php_http_header_get_class_entry(void)
+{
+       return php_http_header_class_entry;
+}
+
 ZEND_BEGIN_ARG_INFO_EX(ai_HttpHeader___construct, 0, 0, 0)
        ZEND_ARG_INFO(0, name)
        ZEND_ARG_INFO(0, value)
@@ -276,7 +282,7 @@ PHP_METHOD(HttpHeader, getParams)
        
        ZVAL_STRINGL(&zctor, "__construct", lenof("__construct"));
        
-       object_init_ex(&zparams_obj, php_http_params_class_entry);
+       object_init_ex(&zparams_obj, php_http_params_get_class_entry());
        
        zargs = (zval *) ecalloc(ZEND_NUM_ARGS()+1, sizeof(zval));
        ZVAL_COPY_VALUE(&zargs[0], zend_read_property(php_http_header_class_entry, getThis(), ZEND_STRL("value"), 0, &value_tmp));
@@ -356,8 +362,6 @@ static zend_function_entry php_http_header_methods[] = {
        EMPTY_FUNCTION_ENTRY
 };
 
-zend_class_entry *php_http_header_class_entry;
-
 PHP_MINIT_FUNCTION(http_header)
 {
        zend_class_entry ce = {0};