Commits

Ruslan Osmanov committed 8f8f228

Preparing for stable release
Change: watcher createStopped methods made final
Change: watcher factory methods made final
Bumb version, doc

Comments (0)

Files changed (3)

+Handle error when user attempts to attach a signal to different loops
+=====================================================================
+
+There are problems with the following assertion in ev.c:
+
+  assert (("libev: a signal must not be attached to two different loops",
+             !signals [w->signum - 1].loop || signals [w->signum - 1].loop == loop));
+
+Thus, before starting a signal watcher, I have to check it as follows:
+
+ 	 if (signals[(w)->signum - 1].loop
+ 	 && signals[(w)->signum - 1].loop != my_loop_ptr) {
+     	 /* error */
+     	 }
+
+But `signals` declared as static in libev/ev.c:
+
+	static ANSIG signals [EV_NSIG - 1]; 
+
+So I need my own(MyG()?) array to check this.
+
 Add EvLoop::setInvokePendingCallback(`ev_set_invoke_pending_cb`)?
 =================================================================
 
 	PHP_ME(EvLoop, now,           arginfo_ev__void,        ZEND_ACC_PUBLIC)
 	PHP_ME(EvLoop, run,           arginfo_ev_run,          ZEND_ACC_PUBLIC)
 	PHP_ME(EvLoop, stop,          arginfo_ev_stop,         ZEND_ACC_PUBLIC)
-	PHP_ME(EvLoop, io,            arginfo_ev_loop_io,      ZEND_ACC_PUBLIC)
-	PHP_ME(EvLoop, timer,         arginfo_ev_loop_timer,   ZEND_ACC_PUBLIC)
+	PHP_ME(EvLoop, io,            arginfo_ev_loop_io,      ZEND_ACC_PUBLIC | ZEND_ACC_FINAL)
+	PHP_ME(EvLoop, timer,         arginfo_ev_loop_timer,   ZEND_ACC_PUBLIC | ZEND_ACC_FINAL)
 #if EV_PERIODIC_ENABLE
-	PHP_ME(EvLoop, periodic,      arginfo_ev_loop_periodic,     ZEND_ACC_PUBLIC)
+	PHP_ME(EvLoop, periodic,      arginfo_ev_loop_periodic,     ZEND_ACC_PUBLIC | ZEND_ACC_FINAL)
 #endif
 #if EV_SIGNAL_ENABLE
-	PHP_ME(EvLoop, signal,        arginfo_ev_loop_signal,       ZEND_ACC_PUBLIC)
+	PHP_ME(EvLoop, signal,        arginfo_ev_loop_signal,       ZEND_ACC_PUBLIC | ZEND_ACC_FINAL)
 #endif
 #if EV_CHILD_ENABLE
-	PHP_ME(EvLoop, child,         arginfo_ev_loop_child,        ZEND_ACC_PUBLIC)
+	PHP_ME(EvLoop, child,         arginfo_ev_loop_child,        ZEND_ACC_PUBLIC | ZEND_ACC_FINAL)
 #endif
 #if EV_STAT_ENABLE
-	PHP_ME(EvLoop, stat,          arginfo_ev_loop_stat,         ZEND_ACC_PUBLIC)
+	PHP_ME(EvLoop, stat,          arginfo_ev_loop_stat,         ZEND_ACC_PUBLIC | ZEND_ACC_FINAL)
 #endif
 #if EV_IDLE_ENABLE
-	PHP_ME(EvLoop, idle,          arginfo_ev_loop_idle,         ZEND_ACC_PUBLIC)
+	PHP_ME(EvLoop, idle,          arginfo_ev_loop_idle,         ZEND_ACC_PUBLIC | ZEND_ACC_FINAL)
 #endif
 #if EV_CHECK_ENABLE
-	PHP_ME(EvLoop, check,         arginfo_ev_loop_check,        ZEND_ACC_PUBLIC)
+	PHP_ME(EvLoop, check,         arginfo_ev_loop_check,        ZEND_ACC_PUBLIC | ZEND_ACC_FINAL)
 #endif
 #if EV_PREPARE_ENABLE
-	PHP_ME(EvLoop, prepare,       arginfo_ev_loop_prepare,      ZEND_ACC_PUBLIC)
+	PHP_ME(EvLoop, prepare,       arginfo_ev_loop_prepare,      ZEND_ACC_PUBLIC | ZEND_ACC_FINAL)
 #endif
 #if EV_EMBED_ENABLE
-	PHP_ME(EvLoop, embed,         arginfo_ev_loop_embed,        ZEND_ACC_PUBLIC)
+	PHP_ME(EvLoop, embed,         arginfo_ev_loop_embed,        ZEND_ACC_PUBLIC | ZEND_ACC_FINAL)
 #endif
 #if EV_FORK_ENABLE
-	PHP_ME(EvLoop, fork,          arginfo_ev_loop_fork,         ZEND_ACC_PUBLIC)
+	PHP_ME(EvLoop, fork,          arginfo_ev_loop_fork,         ZEND_ACC_PUBLIC | ZEND_ACC_FINAL)
 #endif
 
 	{ NULL, NULL, NULL }
 const zend_function_entry ev_io_class_entry_functions[] = {
 	PHP_ME(EvIo, __construct,   arginfo_ev_io,     ZEND_ACC_PUBLIC  | ZEND_ACC_CTOR)
 	PHP_ME(EvIo, set,           arginfo_ev_io_set, ZEND_ACC_PUBLIC)
-	PHP_ME(EvIo, createStopped, arginfo_ev_io,     ZEND_ACC_PUBLIC  | ZEND_ACC_STATIC)
+	PHP_ME(EvIo, createStopped, arginfo_ev_io,     ZEND_ACC_PUBLIC  | ZEND_ACC_STATIC | ZEND_ACC_FINAL)
 	{ NULL, NULL, NULL }
 };
 /* }}} */
 	PHP_ME(EvTimer, __construct,   arginfo_ev_timer,     ZEND_ACC_PUBLIC  | ZEND_ACC_CTOR)
 	PHP_ME(EvTimer, set,           arginfo_ev_timer_set, ZEND_ACC_PUBLIC)
 	PHP_ME(EvTimer, again,         arginfo_ev__void,     ZEND_ACC_PUBLIC)
-	PHP_ME(EvTimer, createStopped, arginfo_ev_timer,     ZEND_ACC_PUBLIC  | ZEND_ACC_STATIC)
+	PHP_ME(EvTimer, createStopped, arginfo_ev_timer,     ZEND_ACC_PUBLIC  | ZEND_ACC_STATIC | ZEND_ACC_FINAL)
 
 	{ NULL, NULL, NULL }
 };
 	PHP_ME(EvPeriodic, set,           arginfo_ev_periodic_set, ZEND_ACC_PUBLIC)
 	PHP_ME(EvPeriodic, again,         arginfo_ev__void,        ZEND_ACC_PUBLIC)
 	PHP_ME(EvPeriodic, at,            arginfo_ev__void,        ZEND_ACC_PUBLIC)
-	PHP_ME(EvPeriodic, createStopped, arginfo_ev_periodic,     ZEND_ACC_PUBLIC  | ZEND_ACC_STATIC)
+	PHP_ME(EvPeriodic, createStopped, arginfo_ev_periodic,     ZEND_ACC_PUBLIC  | ZEND_ACC_STATIC | ZEND_ACC_FINAL)
 
 	{ NULL, NULL, NULL }
 };
 const zend_function_entry ev_signal_class_entry_functions[] = {
 	PHP_ME(EvSignal, __construct,   arginfo_ev_signal,     ZEND_ACC_PUBLIC  | ZEND_ACC_CTOR)
 	PHP_ME(EvSignal, set,           arginfo_ev_signal_set, ZEND_ACC_PUBLIC)
-	PHP_ME(EvSignal, createStopped, arginfo_ev_signal,     ZEND_ACC_PUBLIC  | ZEND_ACC_STATIC)
+	PHP_ME(EvSignal, createStopped, arginfo_ev_signal,     ZEND_ACC_PUBLIC  | ZEND_ACC_STATIC | ZEND_ACC_FINAL)
 
 	{ NULL, NULL, NULL }
 };
 const zend_function_entry ev_child_class_entry_functions[] = {
 	PHP_ME(EvChild, __construct,   arginfo_ev_child,     ZEND_ACC_PUBLIC  | ZEND_ACC_CTOR)
 	PHP_ME(EvChild, set,           arginfo_ev_child_set, ZEND_ACC_PUBLIC)
-	PHP_ME(EvChild, createStopped, arginfo_ev_child,     ZEND_ACC_PUBLIC  | ZEND_ACC_STATIC)
+	PHP_ME(EvChild, createStopped, arginfo_ev_child,     ZEND_ACC_PUBLIC  | ZEND_ACC_STATIC | ZEND_ACC_FINAL)
 
 	{ NULL, NULL, NULL }
 };
 	PHP_ME(EvStat, attr,          arginfo_ev__void,    ZEND_ACC_PUBLIC)
 	PHP_ME(EvStat, prev,          arginfo_ev__void,    ZEND_ACC_PUBLIC)
 	PHP_ME(EvStat, stat,          arginfo_ev__void,    ZEND_ACC_PUBLIC)
-	PHP_ME(EvStat, createStopped, arginfo_ev_stat,     ZEND_ACC_PUBLIC  | ZEND_ACC_STATIC)
+	PHP_ME(EvStat, createStopped, arginfo_ev_stat,     ZEND_ACC_PUBLIC  | ZEND_ACC_STATIC | ZEND_ACC_FINAL)
 
 	{ NULL, NULL, NULL }
 };
 /* {{{ ev_idle_class_entry_functions */
 const zend_function_entry ev_idle_class_entry_functions[] = {
 	PHP_ME(EvIdle, __construct,   arginfo_ev_idle, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
-	PHP_ME(EvIdle, createStopped, arginfo_ev_idle, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+	PHP_ME(EvIdle, createStopped, arginfo_ev_idle, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC | ZEND_ACC_FINAL)
 	{ NULL, NULL, NULL }
 };
 /* }}} */
 /* {{{ ev_check_class_entry_functions */
 const zend_function_entry ev_check_class_entry_functions[] = {
 	PHP_ME(EvCheck, __construct,   arginfo_ev_check, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
-	PHP_ME(EvCheck, createStopped, arginfo_ev_check, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+	PHP_ME(EvCheck, createStopped, arginfo_ev_check, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC | ZEND_ACC_FINAL)
 	{ NULL, NULL, NULL }
 };
 /* }}} */
 /* {{{ ev_prepare_class_entry_functions */
 const zend_function_entry ev_prepare_class_entry_functions[] = {
 	PHP_ME(EvPrepare, __construct,   arginfo_ev_prepare, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
-	PHP_ME(EvPrepare, createStopped, arginfo_ev_prepare, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+	PHP_ME(EvPrepare, createStopped, arginfo_ev_prepare, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC | ZEND_ACC_FINAL)
 	{ NULL, NULL, NULL }
 };
 /* }}} */
 	PHP_ME(EvEmbed, __construct,   arginfo_ev_embed,     ZEND_ACC_PUBLIC  | ZEND_ACC_CTOR)
 	PHP_ME(EvEmbed, set,           arginfo_ev_embed_set, ZEND_ACC_PUBLIC)
 	PHP_ME(EvEmbed, sweep,         arginfo_ev__void,     ZEND_ACC_PUBLIC)
-	PHP_ME(EvEmbed, createStopped, arginfo_ev_embed,     ZEND_ACC_PUBLIC  | ZEND_ACC_STATIC)
+	PHP_ME(EvEmbed, createStopped, arginfo_ev_embed,     ZEND_ACC_PUBLIC  | ZEND_ACC_STATIC | ZEND_ACC_FINAL)
 	{ NULL, NULL, NULL }
 };
 /* }}} */
 /* {{{ ev_fork_class_entry_functions */
 const zend_function_entry ev_fork_class_entry_functions[] = {
 	PHP_ME(EvFork, __construct,   arginfo_ev_fork, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
-	PHP_ME(EvFork, createStopped, arginfo_ev_fork, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+	PHP_ME(EvFork, createStopped, arginfo_ev_fork, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC | ZEND_ACC_FINAL)
 	{ NULL, NULL, NULL }
 };
 /* }}} */
     <email>osmanov@php.net</email>
     <active>yes</active>
   </lead>
-  <date>2012-12-26</date>
+  <date>2012-12-27</date>
   <!--{{{ Current version -->
   <version>
     <release>0.2.0</release>
   </version>
   <stability>
     <release>beta</release>
-    <api>beta</api>
+    <api>stable</api>
   </stability>
   <license uri="http://www.php.net/license">PHP</license>
   <notes>
   Change: moved all constants to Ev class
   Fix: release version
   Del: callback parameter from EvLoop constructor/factories
+  Change: watcher createStopped methods made final
+  Change: watcher factory methods made final
   </notes>
   <!--}}}-->
   <!--{{{ Contents -->
     <api>0.2.0</api>
   </version>
   <stability>
-    <release>beta</release>
-    <api>beta</api>
+    <release>stable</release>
+    <api>stable</api>
   </stability>
   <license uri="http://www.php.net/license">PHP</license>
   <notes>
   Change: moved all constants to Ev class
   Fix: release version
   Del: callback parameter from EvLoop constructor/factories
+  Change: watcher createStopped methods made final
+  Change: watcher factory methods made final
   </notes>
   <!--}}}-->
     <!--{{{ 0.1.1 (beta) -->
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.