Fix calls to zend_parse_parameters that used long instead of zend_long for 'l', and...
[m6w6/ext-http] / src / php_http_cookie.c
index 9625401aecdec149fdcaff522bd9e5f1269054ca..2e2943338565c158cc86e0c1771ca09b991e063f 100644 (file)
@@ -366,6 +366,11 @@ void php_http_cookie_list_to_string(php_http_cookie_list_t *list, char **str, si
 }
 
 
+static zend_class_entry *php_http_cookie_class_entry;
+zend_class_entry *php_http_cookie_get_class_entry(void)
+{
+       return php_http_cookie_class_entry;
+}
 
 static zend_object_handlers php_http_cookie_object_handlers;
 
@@ -430,7 +435,7 @@ static PHP_METHOD(HttpCookie, __construct)
 {
        php_http_cookie_object_t *obj;
        zval *zcookie = NULL;
-       long flags = 0;
+       zend_long flags = 0;
        char **ae = NULL;
        HashTable *allowed_extras = NULL;
        zend_error_handling zeh;
@@ -439,7 +444,7 @@ static PHP_METHOD(HttpCookie, __construct)
 
        obj = PHP_HTTP_OBJ(NULL, getThis());
 
-       zend_replace_error_handling(EH_THROW, php_http_exception_runtime_class_entry, &zeh);
+       zend_replace_error_handling(EH_THROW, php_http_get_exception_runtime_class_entry(), &zeh);
        if (zcookie) {
 
                if (allowed_extras && zend_hash_num_elements(allowed_extras)) {
@@ -851,7 +856,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_setExpires, 0, 0, 0)
 ZEND_END_ARG_INFO();
 static PHP_METHOD(HttpCookie, setExpires)
 {
-       long ts = -1;
+       zend_long ts = -1;
        php_http_cookie_object_t *obj;
 
        php_http_expect(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &ts), invalid_arg, return);
@@ -887,7 +892,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_setMaxAge, 0, 0, 0)
 ZEND_END_ARG_INFO();
 static PHP_METHOD(HttpCookie, setMaxAge)
 {
-       long ma = -1;
+       zend_long ma = -1;
        php_http_cookie_object_t *obj;
 
        php_http_expect(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &ma), invalid_arg, return);
@@ -923,7 +928,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_setFlags, 0, 0, 0)
 ZEND_END_ARG_INFO();
 static PHP_METHOD(HttpCookie, setFlags)
 {
-       long flags = 0;
+       zend_long flags = 0;
        php_http_cookie_object_t *obj;
 
        php_http_expect(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &flags), invalid_arg, return);
@@ -1010,8 +1015,6 @@ static zend_function_entry php_http_cookie_methods[] = {
        EMPTY_FUNCTION_ENTRY
 };
 
-zend_class_entry *php_http_cookie_class_entry;
-
 PHP_MINIT_FUNCTION(http_cookie)
 {
        zend_class_entry ce = {0};