Commits

Ruslan Osmanov committed 608d32c

Add: EventBase::resume method

  • Participants
  • Parent commits 826b934

Comments (0)

Files changed (4)

File classes/base.c

 }
 /* }}} */
 
+#if LIBEVENT_VERSION_NUMBER >= 0x02010200
+/* {{{ proto bool EventBase::resume(void);
+ * Tells event_base to resume previously stopped event.
+ * Available since libevent version 2.1.2-alpha. */
+PHP_METHOD(EventBase, resume)
+{
+	zval             *zbase = getThis();
+	php_event_base_t *b;
+
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
+	}
+
+	PHP_EVENT_FETCH_BASE(b, zbase);
+
+	if (event_base_loopcontinue(b->base)) {
+		RETURN_FALSE;
+	}
+	RETVAL_TRUE;
+}
+/* }}} */
+#endif
+
 /*
  * Local variables:
  * tab-width: 4
   Fix: with OpenSSL turned off got error: undefined symbol: zim_EventUtil_sslRandPoll
   Add: implemented get_properties property handler(is called when one casts an object to array)
   Refact: removed memory alloc for empty property hashtables
-  Fix: heap corruption caused by EventBufferEvent callbacks
+  Fix: heap corruption caused by EventBufferEvent callbacks(thanks to Marco Schuster)
   Fix: possible heap corruption in EventListener's callback
+  Add: EventBase::resume method
   ]]></notes>
   <!--}}}-->
   <!--{{{ Contents -->
       Fix: with OpenSSL turned off got error: undefined symbol: zim_EventUtil_sslRandPoll
       Add: implemented get_properties property handler(is called when one casts an object to array)
       Refact: removed memory alloc for empty property hashtables
-      Fix: heap corruption caused by EventBufferEvent callbacks
+      Fix: heap corruption caused by EventBufferEvent callbacks(thanks to Marco Schuster)
       Fix: possible heap corruption in EventListener's callback
+      Add: EventBase::resume method
       ]]></notes>
     </release>
     <!--}}}-->
 #if LIBEVENT_VERSION_NUMBER >= 0x02010100
 	PHP_ME(EventBase, updateCacheTime, arginfo_event__void, ZEND_ACC_PUBLIC)
 #endif
+#if LIBEVENT_VERSION_NUMBER >= 0x02010200
+	PHP_ME(EventBase, resume,             arginfo_event__void,              ZEND_ACC_PUBLIC)
+#endif
 														   
 	PHP_FE_END
 };
 PHP_METHOD(EventBase, updateCacheTime);
 #endif
 PHP_METHOD(EventBase, reInit);
+#if LIBEVENT_VERSION_NUMBER >= 0x02010200
+PHP_METHOD(EventBase, resume);
+#endif
 
 PHP_METHOD(EventConfig, __construct);
 PHP_METHOD(EventConfig, avoidMethod);