- reflection awareness for HttpResponse, HttpMessage and HttpRequestPool
[m6w6/ext-http] / php_http_std_defs.h
index 86f2ec0684e8842f85d29cb742764bb4b128f771..58531b8ca4d6c2f590ae19edb1b570559bcb90a9 100644 (file)
@@ -244,6 +244,16 @@ typedef int STATUS;
 #define HTTP_E_URL                     7L
 #define HTTP_E_MSG                     8L
 
+#ifdef ZEND_ENGINE_2
+#      define HTTP_BEGIN_ARGS_EX(class, method, ret_ref, req_args)     static ZEND_BEGIN_ARG_INFO_EX(args_for_ ##class## _ ##method , 0, ret_ref, req_args)
+#      define HTTP_BEGIN_ARGS_AR(class, method, ret_ref, req_args)     static ZEND_BEGIN_ARG_INFO_EX(args_for_ ##class## _ ##method , 1, ret_ref, req_args)
+#      define HTTP_END_ARGS                                                                            }
+#      define HTTP_EMPTY_ARGS_EX(class, method, ret_ref)                       HTTP_BEGIN_ARGS_EX(class, method, ret_ref, 0) HTTP_END_ARGS
+#      define HTTP_ARGS(class, method)                                                         args_for_ ##class## _ ##method
+#      define HTTP_ARG_VAL(name, pass_ref)                                                     ZEND_ARG_INFO(pass_ref, name)
+#      define HTTP_ARG_OBJ(class, name, allow_null)                            ZEND_ARG_OBJ_INFO(1, name, class, allow_null)
+#endif
+
 #ifdef HTTP_HAVE_CURL
 #      ifdef ZEND_ENGINE_2
 #              define HTTP_DECLARE_ARG_PASS_INFO() \
@@ -287,6 +297,24 @@ typedef int STATUS;
 #endif /* HTTP_HAVE_CURL */
 
 
+#ifndef TSRMLS_FETCH_FROM_CTX
+#      ifdef ZTS
+#              define TSRMLS_FETCH_FROM_CTX(ctx)       void ***tsrm_ls = (void ***) ctx
+#      else
+#              define TSRMLS_FETCH_FROM_CTX(ctx)
+#      endif
+#endif
+
+#ifndef TSRMLS_SET_CTX
+#      ifdef ZTS
+#              define TSRMLS_SET_CTX(ctx)      (void ***) ctx = tsrm_ls
+#      else
+#              define TSRMLS_SET_CTX(ctx)
+#      endif
+#endif
+
+
+
 #endif /* PHP_HTTP_STD_DEFS_H */
 
 /*