1. Ruslan Osmanov
  2. pecl-event

Commits

Remi Collet  committed 8dcea83

Fix pec bug #65847, evhttp_connection_get_bufferevent in libevent >= 2.0.17

  • Participants
  • Parent commits 0fa8deb
  • Branches master

Comments (0)

Files changed (3)

File classes/http_request.c

View file
  • Ignore whitespace
 }
 /* }}} */
 
+#if LIBEVENT_VERSION_NUMBER >= 0x02001100
 /* {{{ proto EventBufferEvent EventHttpRequest::getBufferEvent(void);
  * Returns EventBufferEvent object on success, otherwise &null. */
 PHP_METHOD(EventHttpRequest, getBufferEvent)
 	bev->_internal = 1;
 }
 /* }}} */
+#endif
 
 /* {{{ proto EventHttpConnection EventHttpRequest::getConnection(void);
  * Returns EventHttpConnection object. 

File src/fe.c

View file
  • Ignore whitespace
 	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)
 

File src/fe.h

View file
  • Ignore whitespace
 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);