- Fixed build on php-trunk
[m6w6/ext-http] / http_request_pool_api.c
index c9ca5362f2604da89a4ed0f61564a2bb053e63fa..04acb2e6f07047f14723823bc472f7f1b72bd959 100644 (file)
@@ -6,7 +6,7 @@
     | modification, are permitted provided that the conditions mentioned |
     | in the accompanying LICENSE file are met.                          |
     +--------------------------------------------------------------------+
-    | Copyright (c) 2004-2007, Michael Wallner <mike@php.net>            |
+    | Copyright (c) 2004-2010, Michael Wallner <mike@php.net>            |
     +--------------------------------------------------------------------+
 */
 
@@ -109,7 +109,9 @@ PHP_HTTP_API http_request_pool *_http_request_pool_init(http_request_pool *pool
 /* {{{ STATUS http_request_pool_attach(http_request_pool *, zval *) */
 PHP_HTTP_API STATUS _http_request_pool_attach(http_request_pool *pool, zval *request)
 {
+#ifdef ZTS
        TSRMLS_FETCH_FROM_CTX(pool->tsrm_ls);
+#endif
        getObjectEx(http_request_object, req, request);
        
 #if HTTP_DEBUG_REQPOOLS
@@ -146,7 +148,9 @@ PHP_HTTP_API STATUS _http_request_pool_attach(http_request_pool *pool, zval *req
 PHP_HTTP_API STATUS _http_request_pool_detach(http_request_pool *pool, zval *request)
 {
        CURLMcode code;
+#ifdef ZTS
        TSRMLS_FETCH_FROM_CTX(pool->tsrm_ls);
+#endif
        getObjectEx(http_request_object, req, request);
        
 #if HTTP_DEBUG_REQPOOLS
@@ -409,7 +413,9 @@ void _http_request_pool_responsehandler(http_request_pool *pool)
 /* {{{ int http_request_pool_apply_responsehandler(http_request_pool *, zval *, void *) */
 int _http_request_pool_apply_responsehandler(http_request_pool *pool, zval *req, void *ch)
 {
+#ifdef ZTS
        TSRMLS_FETCH_FROM_CTX(pool->tsrm_ls);
+#endif
        getObjectEx(http_request_object, obj, req);
        
        if ((!ch) || obj->request->ch == (CURL *) ch) {