attempt to fix trunk build
authorMichael Wallner <mike@php.net>
Mon, 3 May 2010 08:26:38 +0000 (08:26 +0000)
committerMichael Wallner <mike@php.net>
Mon, 3 May 2010 08:26:38 +0000 (08:26 +0000)
http_message_object.c
http_querystring_object.c
http_requestdatashare_object.c
http_response_object.c
missing.h
php_http.h
php_http_api.h

index 8d1e847..a5b2ca8 100644 (file)
@@ -146,11 +146,11 @@ HTTP_END_ARGS;
 HTTP_EMPTY_ARGS(reverse);
 
 #define http_message_object_read_prop _http_message_object_read_prop
-static zval *_http_message_object_read_prop(zval *object, zval *member, int type TSRMLS_DC);
+static zval *_http_message_object_read_prop(zval *object, zval *member, int type ZEND_LITERAL_KEY_DC TSRMLS_DC);
 #define http_message_object_write_prop _http_message_object_write_prop
-static void _http_message_object_write_prop(zval *object, zval *member, zval *value TSRMLS_DC);
+static void _http_message_object_write_prop(zval *object, zval *member, zval *value ZEND_LITERAL_KEY_DC TSRMLS_DC);
 #define http_message_object_get_prop_ptr _http_message_object_get_prop_ptr
-static zval **_http_message_object_get_prop_ptr(zval *object, zval *member TSRMLS_DC);
+static zval **_http_message_object_get_prop_ptr(zval *object, zval *member ZEND_LITERAL_KEY_DC TSRMLS_DC);
 #define http_message_object_get_props _http_message_object_get_props
 static HashTable *_http_message_object_get_props(zval *object TSRMLS_DC);
 
@@ -558,7 +558,7 @@ void _http_message_object_free(zend_object *object TSRMLS_DC)
        freeObject(o);
 }
 
-static zval **_http_message_object_get_prop_ptr(zval *object, zval *member TSRMLS_DC) {
+static zval **_http_message_object_get_prop_ptr(zval *object, zval *member ZEND_LITERAL_KEY_DC TSRMLS_DC) {
        getObjectEx(http_message_object, obj, object);
        http_message_object_prophandler *handler;
        
@@ -567,10 +567,10 @@ static zval **_http_message_object_get_prop_ptr(zval *object, zval *member TSRML
                return NULL;
        }
 
-       return zend_get_std_object_handlers()->get_property_ptr_ptr(object, member TSRMLS_CC);
+       return zend_get_std_object_handlers()->get_property_ptr_ptr(object, member ZEND_LITERAL_KEY_CC TSRMLS_CC);
 }
 
-static zval *_http_message_object_read_prop(zval *object, zval *member, int type TSRMLS_DC)
+static zval *_http_message_object_read_prop(zval *object, zval *member, int type ZEND_LITERAL_KEY_DC TSRMLS_DC)
 {
        getObjectEx(http_message_object, obj, object);
        http_message_object_prophandler *handler;
@@ -594,13 +594,13 @@ static zval *_http_message_object_read_prop(zval *object, zval *member, int type
                handler->read(obj, return_value TSRMLS_CC);
 
        } else {
-               return_value = zend_get_std_object_handlers()->read_property(object, member, type TSRMLS_CC);
+               return_value = zend_get_std_object_handlers()->read_property(object, member, type ZEND_LITERAL_KEY_CC TSRMLS_CC);
        }
        
        return return_value;
 }
 
-static void _http_message_object_write_prop(zval *object, zval *member, zval *value TSRMLS_DC)
+static void _http_message_object_write_prop(zval *object, zval *member, zval *value ZEND_LITERAL_KEY_DC TSRMLS_DC)
 {
        getObjectEx(http_message_object, obj, object);
        http_message_object_prophandler *handler;
@@ -608,7 +608,7 @@ static void _http_message_object_write_prop(zval *object, zval *member, zval *va
        if (SUCCESS == http_message_object_get_prophandler(Z_STRVAL_P(member), Z_STRLEN_P(member), &handler)) {
                handler->write(obj, value TSRMLS_CC);
        } else {
-               zend_get_std_object_handlers()->write_property(object, member, value TSRMLS_CC);
+               zend_get_std_object_handlers()->write_property(object, member, value ZEND_LITERAL_KEY_CC TSRMLS_CC);
        }
 }
 
index 91b9c89..0e7b2ac 100644 (file)
@@ -442,7 +442,7 @@ PHP_METHOD(HttpQueryString, mod)
 PHP_METHOD(HttpQueryString, singleton)
 {
        zend_bool global = 1;
-       zval *instance = *zend_std_get_static_property(THIS_CE, ZEND_STRS("instance")-1, 0 TSRMLS_CC);
+       zval *instance = *zend_std_get_static_property(THIS_CE, ZEND_STRS("instance")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC);
        
        SET_EH_THROW_HTTP();
        if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &global)) {
index d13c5d6..8eacef8 100644 (file)
@@ -60,9 +60,9 @@ HTTP_END_ARGS;
 
 
 #define http_requestdatashare_object_read_prop _http_requestdatashare_object_read_prop
-static zval *_http_requestdatashare_object_read_prop(zval *object, zval *member, int type TSRMLS_DC);
+static zval *_http_requestdatashare_object_read_prop(zval *object, zval *member, int type ZEND_LITERAL_KEY_DC TSRMLS_DC);
 #define http_requestdatashare_object_write_prop _http_requestdatashare_object_write_prop
-static void _http_requestdatashare_object_write_prop(zval *object, zval *member, zval *value TSRMLS_DC);
+static void _http_requestdatashare_object_write_prop(zval *object, zval *member, zval *value ZEND_LITERAL_KEY_DC TSRMLS_DC);
 #define http_requestdatashare_instantiate(t, g) _http_requestdatashare_instantiate((t), (g) TSRMLS_CC)
 static inline zval *_http_requestdatashare_instantiate(zval *this_ptr, zend_bool global TSRMLS_DC);
 
@@ -145,17 +145,17 @@ void _http_requestdatashare_object_free(zend_object *object TSRMLS_DC)
        freeObject(o);
 }
 
-static zval *_http_requestdatashare_object_read_prop(zval *object, zval *member, int type TSRMLS_DC)
+static zval *_http_requestdatashare_object_read_prop(zval *object, zval *member, int type ZEND_LITERAL_KEY_DC TSRMLS_DC)
 {
        if (type == BP_VAR_W && zend_hash_exists(&THIS_CE->default_properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1)) {
                zend_error(E_ERROR, "Cannot access HttpRequestDataShare default properties by reference or array key/index");
                return NULL;
        }
        
-       return zend_get_std_object_handlers()->read_property(object, member, type TSRMLS_CC);
+       return zend_get_std_object_handlers()->read_property(object, member, type ZEND_LITERAL_KEY_CC TSRMLS_CC);
 }
 
-static void _http_requestdatashare_object_write_prop(zval *object, zval *member, zval *value TSRMLS_DC)
+static void _http_requestdatashare_object_write_prop(zval *object, zval *member, zval *value ZEND_LITERAL_KEY_DC TSRMLS_DC)
 {
        if (zend_hash_exists(&THIS_CE->default_properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1)) {
                int status;
@@ -167,7 +167,7 @@ static void _http_requestdatashare_object_write_prop(zval *object, zval *member,
                }
        }
        
-       zend_get_std_object_handlers()->write_property(object, member, value TSRMLS_CC);
+       zend_get_std_object_handlers()->write_property(object, member, value ZEND_LITERAL_KEY_CC TSRMLS_CC);
 }
 
 /* {{{ proto void HttpRequestDataShare::__destruct()
@@ -247,7 +247,7 @@ PHP_METHOD(HttpRequestDataShare, factory)
 PHP_METHOD(HttpRequestDataShare, singleton)
 {
        zend_bool global = 0;
-       zval *instance = *zend_std_get_static_property(THIS_CE, ZEND_STRS("instance")-1, 0 TSRMLS_CC);
+       zval *instance = *zend_std_get_static_property(THIS_CE, ZEND_STRS("instance")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC);
        
        SET_EH_THROW_HTTP();
        if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &global)) {
index d51c2d1..cfa5095 100644 (file)
@@ -299,7 +299,7 @@ PHP_METHOD(HttpResponse, getCache)
        NO_ARGS;
 
        if (return_value_used) {
-               zval *cache = http_zsep(IS_BOOL, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("cache")-1, 0 TSRMLS_CC)));
+               zval *cache = http_zsep(IS_BOOL, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("cache")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                RETVAL_ZVAL(cache, 1, 1);
        }
 }
@@ -326,7 +326,7 @@ PHP_METHOD(HttpResponse, getGzip)
        NO_ARGS;
 
        if (return_value_used) {
-               zval *gzip = http_zsep(IS_BOOL, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("gzip")-1, 0 TSRMLS_CC)));
+               zval *gzip = http_zsep(IS_BOOL, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("gzip")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                RETVAL_ZVAL(gzip, 1, 1);
        }
 }
@@ -363,7 +363,7 @@ PHP_METHOD(HttpResponse, getCacheControl)
        NO_ARGS;
 
        if (return_value_used) {
-               zval *cctl = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("cacheControl")-1, 0 TSRMLS_CC)));
+               zval *cctl = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("cacheControl")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                RETVAL_ZVAL(cctl, 1, 1);
        }
 }
@@ -392,7 +392,7 @@ PHP_METHOD(HttpResponse, getContentType)
        NO_ARGS;
 
        if (return_value_used) {
-               zval *ctype = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("contentType")-1, 0 TSRMLS_CC)));
+               zval *ctype = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("contentType")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                RETVAL_ZVAL(ctype, 1, 1);
        }
 }
@@ -410,10 +410,10 @@ PHP_METHOD(HttpResponse, guessContentType)
        RETVAL_FALSE;
        SET_EH_THROW_HTTP();
        if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &magic_file, &magic_file_len, &magic_mode)) {
-               switch (Z_LVAL_P(*zend_std_get_static_property(THIS_CE, ZEND_STRS("mode")-1, 0 TSRMLS_CC))) {
+               switch (Z_LVAL_P(*zend_std_get_static_property(THIS_CE, ZEND_STRS("mode")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC))) {
                        case SEND_DATA:
                        {
-                               zval *data = *zend_std_get_static_property(THIS_CE, ZEND_STRS("data")-1, 0 TSRMLS_CC);
+                               zval *data = *zend_std_get_static_property(THIS_CE, ZEND_STRS("data")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC);
                                ct = http_guess_content_type(magic_file, magic_mode, Z_STRVAL_P(data), Z_STRLEN_P(data), SEND_DATA);
                                break;
                        }
@@ -421,7 +421,7 @@ PHP_METHOD(HttpResponse, guessContentType)
                        case SEND_RSRC:
                        {
                                php_stream *s;
-                               zval *z = *zend_std_get_static_property(THIS_CE, ZEND_STRS("stream")-1, 0 TSRMLS_CC);
+                               zval *z = *zend_std_get_static_property(THIS_CE, ZEND_STRS("stream")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC);
                                z->type = IS_RESOURCE;
                                php_stream_from_zval(s, &z);
                                ct = http_guess_content_type(magic_file, magic_mode, s, 0, SEND_RSRC);
@@ -429,7 +429,7 @@ PHP_METHOD(HttpResponse, guessContentType)
                        }
                        
                        default:
-                               ct = http_guess_content_type(magic_file, magic_mode, Z_STRVAL_P(*zend_std_get_static_property(THIS_CE, ZEND_STRS("file")-1, 0 TSRMLS_CC)), 0, -1);
+                               ct = http_guess_content_type(magic_file, magic_mode, Z_STRVAL_P(*zend_std_get_static_property(THIS_CE, ZEND_STRS("file")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)), 0, -1);
                                break;
                }
                if (ct) {
@@ -471,7 +471,7 @@ PHP_METHOD(HttpResponse, getContentDisposition)
        NO_ARGS;
 
        if (return_value_used) {
-               zval *cdisp = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("contentDisposition")-1, 0 TSRMLS_CC)));
+               zval *cdisp = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("contentDisposition")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                RETVAL_ZVAL(cdisp, 1, 1);
        }
 }
@@ -499,7 +499,7 @@ PHP_METHOD(HttpResponse, getETag)
        NO_ARGS;
 
        if (return_value_used) {
-               zval *etag = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("eTag")-1, 0 TSRMLS_CC)));
+               zval *etag = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("eTag")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                RETVAL_ZVAL(etag, 1, 1);
        }
 }
@@ -526,7 +526,7 @@ PHP_METHOD(HttpResponse, getLastModified)
        NO_ARGS;
        
        if (return_value_used) {
-               zval *lmod = http_zsep(IS_LONG, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("lastModified")-1, 0 TSRMLS_CC)));
+               zval *lmod = http_zsep(IS_LONG, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("lastModified")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                RETVAL_ZVAL(lmod, 1, 1);
        }
 }
@@ -552,7 +552,7 @@ PHP_METHOD(HttpResponse, getThrottleDelay)
        NO_ARGS;
 
        if (return_value_used) {
-               zval *tdel = http_zsep(IS_DOUBLE, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("throttleDelay")-1, 0 TSRMLS_CC)));
+               zval *tdel = http_zsep(IS_DOUBLE, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("throttleDelay")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                RETVAL_ZVAL(tdel, 1, 1);
        }
 }
@@ -578,7 +578,7 @@ PHP_METHOD(HttpResponse, getBufferSize)
        NO_ARGS;
 
        if (return_value_used) {
-               zval *bsize = http_zsep(IS_LONG, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("bufferSize")-1, 0 TSRMLS_CC)));
+               zval *bsize = http_zsep(IS_LONG, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("bufferSize")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                RETVAL_ZVAL(bsize, 1, 1);
        }
 }
@@ -620,7 +620,7 @@ PHP_METHOD(HttpResponse, getData)
        NO_ARGS;
 
        if (return_value_used) {
-               zval *the_data = *zend_std_get_static_property(THIS_CE, ZEND_STRS("data")-1, 0 TSRMLS_CC);
+               zval *the_data = *zend_std_get_static_property(THIS_CE, ZEND_STRS("data")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC);
                
                RETURN_ZVAL(the_data, 1, 0);
        }
@@ -668,7 +668,7 @@ PHP_METHOD(HttpResponse, getStream)
        NO_ARGS;
 
        if (return_value_used) {
-               zval *stream = http_zsep(IS_LONG, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("stream")-1, 0 TSRMLS_CC)));
+               zval *stream = http_zsep(IS_LONG, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("stream")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                RETVAL_RESOURCE(Z_LVAL_P(stream));
                zval_ptr_dtor(&stream);
        }
@@ -713,7 +713,7 @@ PHP_METHOD(HttpResponse, getFile)
        NO_ARGS;
 
        if (return_value_used) {
-               zval *file = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("file")-1, 0 TSRMLS_CC)));
+               zval *file = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("file")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                RETVAL_ZVAL(file, 1, 1);
        }
 }
@@ -732,7 +732,7 @@ PHP_METHOD(HttpResponse, send)
        
        HTTP_CHECK_HEADERS_SENT(RETURN_FALSE);
 
-       sent = *zend_std_get_static_property(THIS_CE, ZEND_STRS("sent")-1, 0 TSRMLS_CC);
+       sent = *zend_std_get_static_property(THIS_CE, ZEND_STRS("sent")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC);
        if (Z_LVAL_P(sent)) {
                http_error(HE_WARNING, HTTP_E_RESPONSE, "Cannot send HttpResponse, response has already been sent");
                RETURN_FALSE;
@@ -741,15 +741,15 @@ PHP_METHOD(HttpResponse, send)
        }
 
        /* capture mode */
-       if (i_zend_is_true(*zend_std_get_static_property(THIS_CE, ZEND_STRS("catch")-1, 0 TSRMLS_CC))) {
+       if (i_zend_is_true(*zend_std_get_static_property(THIS_CE, ZEND_STRS("catch")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC))) {
                zval *zetag, *the_data;
 
                MAKE_STD_ZVAL(the_data);
                php_ob_get_buffer(the_data TSRMLS_CC);
                zend_update_static_property(THIS_CE, ZEND_STRS("data")-1, the_data TSRMLS_CC);
-               ZVAL_LONG(*zend_std_get_static_property(THIS_CE, ZEND_STRS("mode")-1, 0 TSRMLS_CC), SEND_DATA);
+               ZVAL_LONG(*zend_std_get_static_property(THIS_CE, ZEND_STRS("mode")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC), SEND_DATA);
 
-               zetag = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("eTag")-1, 0 TSRMLS_CC)));
+               zetag = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("eTag")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                if (!Z_STRLEN_P(zetag)) {
                        char *etag = http_etag(Z_STRVAL_P(the_data), Z_STRLEN_P(the_data), SEND_DATA);
                        if (etag) {
@@ -771,12 +771,12 @@ PHP_METHOD(HttpResponse, send)
        }
 
        /* caching */
-       if (i_zend_is_true(*zend_std_get_static_property(THIS_CE, ZEND_STRS("cache")-1, 0 TSRMLS_CC))) {
+       if (i_zend_is_true(*zend_std_get_static_property(THIS_CE, ZEND_STRS("cache")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC))) {
                zval *cctl, *etag, *lmod;
                
-               lmod = http_zsep(IS_LONG, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("lastModified")-1, 0 TSRMLS_CC)));
-               etag = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("eTag")-1, 0 TSRMLS_CC)));
-               cctl = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("cacheControl")-1, 0 TSRMLS_CC)));
+               lmod = http_zsep(IS_LONG, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("lastModified")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
+               etag = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("eTag")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
+               cctl = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("cacheControl")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                
                if (Z_LVAL_P(lmod) || Z_STRLEN_P(etag)) {
                        if (Z_STRLEN_P(cctl)) {
@@ -799,7 +799,7 @@ PHP_METHOD(HttpResponse, send)
 
        /* content type */
        {
-               zval *ctype = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("contentType")-1, 0 TSRMLS_CC)));
+               zval *ctype = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("contentType")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                if (Z_STRLEN_P(ctype)) {
                        http_send_content_type(Z_STRVAL_P(ctype), Z_STRLEN_P(ctype));
                } else {
@@ -817,7 +817,7 @@ PHP_METHOD(HttpResponse, send)
 
        /* content disposition */
        {
-               zval *cd = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("contentDisposition")-1, 0 TSRMLS_CC)));
+               zval *cd = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("contentDisposition")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                if (Z_STRLEN_P(cd)) {
                        http_send_header_ex("Content-Disposition", lenof("Content-Disposition"), Z_STRVAL_P(cd), Z_STRLEN_P(cd), 1, NULL);
                }
@@ -826,8 +826,8 @@ PHP_METHOD(HttpResponse, send)
 
        /* throttling */
        {
-               zval *bsize = http_zsep(IS_LONG, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("bufferSize")-1, 0 TSRMLS_CC)));
-               zval *delay = http_zsep(IS_DOUBLE, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("throttleDelay")-1, 0 TSRMLS_CC)));
+               zval *bsize = http_zsep(IS_LONG, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("bufferSize")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
+               zval *delay = http_zsep(IS_DOUBLE, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("throttleDelay")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                HTTP_G->send.buffer_size    = Z_LVAL_P(bsize);
                HTTP_G->send.throttle_delay = Z_DVAL_P(delay);
                zval_ptr_dtor(&bsize);
@@ -835,13 +835,13 @@ PHP_METHOD(HttpResponse, send)
        }
 
        /* gzip */
-       HTTP_G->send.deflate.response = i_zend_is_true(*zend_std_get_static_property(THIS_CE, ZEND_STRS("gzip")-1, 0 TSRMLS_CC));
+       HTTP_G->send.deflate.response = i_zend_is_true(*zend_std_get_static_property(THIS_CE, ZEND_STRS("gzip")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC));
        
        /* send */
-       switch (Z_LVAL_P(*zend_std_get_static_property(THIS_CE, ZEND_STRS("mode")-1, 0 TSRMLS_CC))) {
+       switch (Z_LVAL_P(*zend_std_get_static_property(THIS_CE, ZEND_STRS("mode")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC))) {
                case SEND_DATA:
                {
-                       zval *zdata = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("data")-1, 0 TSRMLS_CC)));
+                       zval *zdata = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("data")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                        RETVAL_SUCCESS(http_send_data(Z_STRVAL_P(zdata), Z_STRLEN_P(zdata)));
                        zval_ptr_dtor(&zdata);
                        return;
@@ -850,7 +850,7 @@ PHP_METHOD(HttpResponse, send)
                case SEND_RSRC:
                {
                        php_stream *the_real_stream;
-                       zval *the_stream = http_zsep(IS_LONG, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("stream")-1, 0 TSRMLS_CC)));
+                       zval *the_stream = http_zsep(IS_LONG, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("stream")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                        the_stream->type = IS_RESOURCE;
                        php_stream_from_zval(the_real_stream, &the_stream);
                        RETVAL_SUCCESS(http_send_stream(the_real_stream));
@@ -860,7 +860,7 @@ PHP_METHOD(HttpResponse, send)
 
                default:
                {
-                       zval *file = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("file")-1, 0 TSRMLS_CC)));
+                       zval *file = http_zsep(IS_STRING, *(zend_std_get_static_property(THIS_CE, ZEND_STRS("file")-1, 0 ZEND_LITERAL_NIL_CC TSRMLS_CC)));
                        RETVAL_SUCCESS(http_send_file(Z_STRVAL_P(file)));
                        zval_ptr_dtor(&file);
                        return;
index 5a1fc48..b3a249f 100644 (file)
--- a/missing.h
+++ b/missing.h
 
 #include "php_version.h"
 
+#if defined(PHP_VERSION_ID) && (PHP_VERSION_ID >= 50399)
+#      define ZEND_LITERAL_KEY_DC , const zend_literal *_zend_literal_key
+#      define ZEND_LITERAL_KEY_CC , _zend_literal_key
+#      define ZEND_LITERAL_NIL_CC , NULL
+#      define HTTP_CHECK_OPEN_BASEDIR(file, act) \
+       if ((PG(open_basedir) && *PG(open_basedir))) \
+       { \
+               const char *tmp = file; \
+ \
+               if (!strncasecmp(tmp, "file:", lenof("file:"))) { \
+                       tmp += lenof("file:"); \
+                       while ((tmp - (const char *)file < 7) && (*tmp == '/' || *tmp == '\\')) ++tmp; \
+               } \
+ \
+               if (    (tmp != file || !strstr(file, "://")) && \
+                               (!*tmp || php_check_open_basedir(tmp TSRMLS_CC))) { \
+                               act; \
+               } \
+       }
+
+#else
+#      define ZEND_LITERAL_KEY_DC
+#      define ZEND_LITERAL_KEY_CC
+#      define HTTP_CHECK_OPEN_BASEDIR(file, act) \
+       if ((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) \
+       { \
+               const char *tmp = file; \
+ \
+               if (!strncasecmp(tmp, "file:", lenof("file:"))) { \
+                       tmp += lenof("file:"); \
+                       while ((tmp - (const char *)file < 7) && (*tmp == '/' || *tmp == '\\')) ++tmp; \
+               } \
+ \
+               if (    (tmp != file || !strstr(file, "://")) && \
+                               (!*tmp || php_check_open_basedir(tmp TSRMLS_CC) || \
+                               (PG(safe_mode) && !php_checkuid(tmp, "rb+", CHECKUID_CHECK_MODE_PARAM)))) { \
+                               act; \
+               } \
+       }
+
+#endif
+
 #if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION >= 3)
 #      define HTTP_ZAPI_HASH_TSRMLS_CC TSRMLS_CC
 #      define HTTP_ZAPI_HASH_TSRMLS_DC TSRMLS_DC
index 9bbf114..311c6d5 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef PHP_EXT_HTTP_H
 #define PHP_EXT_HTTP_H
 
-#define PHP_HTTP_VERSION "1.7.0b2"
+#define PHP_HTTP_VERSION "1.7.0"
 
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
index 9f40191..fdee36d 100644 (file)
@@ -111,23 +111,6 @@ extern STATUS _http_object_new(zend_object_value *ov, const char *cname_str, uin
                action; \
        }
 
-#define HTTP_CHECK_OPEN_BASEDIR(file, act) \
-       if ((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) \
-       { \
-               const char *tmp = file; \
- \
-               if (!strncasecmp(tmp, "file:", lenof("file:"))) { \
-                       tmp += lenof("file:"); \
-                       while ((tmp - (const char *)file < 7) && (*tmp == '/' || *tmp == '\\')) ++tmp; \
-               } \
- \
-               if (    (tmp != file || !strstr(file, "://")) && \
-                               (!*tmp || php_check_open_basedir(tmp TSRMLS_CC) || \
-                               (PG(safe_mode) && !php_checkuid(tmp, "rb+", CHECKUID_CHECK_MODE_PARAM)))) { \
-                               act; \
-               } \
-       }
-
 #define http_log(f, i, m) _http_log_ex((f), (i), (m) TSRMLS_CC)
 extern void _http_log_ex(char *file, const char *ident, const char *message TSRMLS_DC);