summaryrefslogtreecommitdiffstats
path: root/event-ver.patch
diff options
context:
space:
mode:
Diffstat (limited to 'event-ver.patch')
-rw-r--r--event-ver.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/event-ver.patch b/event-ver.patch
new file mode 100644
index 0000000..9c821f1
--- /dev/null
+++ b/event-ver.patch
@@ -0,0 +1,48 @@
+diff --git a/classes/http_request.c b/classes/http_request.c
+index 4cf536e..bf5ffe4 100644
+--- a/classes/http_request.c
++++ b/classes/http_request.c
+@@ -355,6 +355,7 @@ PHP_METHOD(EventHttpRequest, getOutputBuffer)
+ }
+ /* }}} */
+
++#if LIBEVENT_VERSION_NUMBER >= 0x02001100
+ /* {{{ proto EventBufferEvent EventHttpRequest::getBufferEvent(void);
+ * Returns EventBufferEvent object on success, otherwise &null. */
+ PHP_METHOD(EventHttpRequest, getBufferEvent)
+@@ -387,6 +388,7 @@ PHP_METHOD(EventHttpRequest, getBufferEvent)
+ bev->_internal = 1;
+ }
+ /* }}} */
++#endif
+
+ /* {{{ proto EventHttpConnection EventHttpRequest::getConnection(void);
+ * Returns EventHttpConnection object.
+diff --git a/src/fe.c b/src/fe.c
+index ccfef57..2a4d1e6 100644
+--- a/src/fe.c
++++ b/src/fe.c
+@@ -697,7 +697,9 @@ const zend_function_entry php_event_http_req_ce_functions[] = {
+ PHP_ME(EventHttpRequest, clearHeaders, arginfo_event__void, ZEND_ACC_PUBLIC)
+ PHP_ME(EventHttpRequest, removeHeader, arginfo_event_http_req_remove_header, ZEND_ACC_PUBLIC)
+ PHP_ME(EventHttpRequest, findHeader, arginfo_event_http_req_remove_header, ZEND_ACC_PUBLIC)
++#if LIBEVENT_VERSION_NUMBER >= 0x02001100
+ PHP_ME(EventHttpRequest, getBufferEvent, arginfo_event__void, ZEND_ACC_PUBLIC)
++#endif
+ PHP_ME(EventHttpRequest, getConnection, arginfo_event__void, ZEND_ACC_PUBLIC)
+ PHP_ME(EventHttpRequest, closeConnection, arginfo_event__void, ZEND_ACC_PUBLIC)
+
+diff --git a/src/fe.h b/src/fe.h
+index f57b947..e1d3997 100644
+--- a/src/fe.h
++++ b/src/fe.h
+@@ -192,7 +192,9 @@ PHP_METHOD(EventHttpRequest, addHeader);
+ PHP_METHOD(EventHttpRequest, clearHeaders);
+ PHP_METHOD(EventHttpRequest, removeHeader);
+ PHP_METHOD(EventHttpRequest, findHeader);
++#if LIBEVENT_VERSION_NUMBER >= 0x02001100
+ PHP_METHOD(EventHttpRequest, getBufferEvent);
++#endif
+ PHP_METHOD(EventHttpRequest, getConnection);
+ PHP_METHOD(EventHttpRequest, closeConnection);
+