- PECL #16803, fix NTS build with vc6
authorPierre Joye <pajoye@php.net>
Fri, 27 Nov 2009 09:12:17 +0000 (09:12 +0000)
committerPierre Joye <pajoye@php.net>
Fri, 27 Nov 2009 09:12:17 +0000 (09:12 +0000)
http_request_pool_api.c

index c9ca5362f2604da89a4ed0f61564a2bb053e63fa..4a31985b5a8d942ff879edb52a5dcb90a79aae02 100644 (file)
@@ -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) {