]> rtime.felk.cvut.cz Git - sojka/libev.git/commitdiff
*** empty log message ***
authorMarc Alexander Lehmann <libev@schmorp.de>
Wed, 18 Apr 2012 06:06:04 +0000 (06:06 +0000)
committerMarc Alexander Lehmann <libev@schmorp.de>
Wed, 18 Apr 2012 06:06:04 +0000 (06:06 +0000)
Changes
ev.c
ev.h
ev.pod
ev_vars.h

diff --git a/Changes b/Changes
index 9aea67ea708a07817fdc10917dfd9ff8f14bef44..ff96ff3f8d5930718d1b1d84fad3aefa2c992f11 100644 (file)
--- a/Changes
+++ b/Changes
@@ -5,8 +5,11 @@ TODO: EV_STANDALONE == NO_HASSEL (do not use clock_gettime in ev_standalone)
 
 TODO: document WSA_EV_USE_SOCKET in win32 part
 TODO: ^ OR use WSASend/WSARecv on the handle, which always works
-TODO: throw() for most ev.h functions
-TODO: assert on fd watcher linked list pointint to itself
+TODO: assert on fd watcher linked list pointing to itself
+       - add throw() to all libev functions that cannot throw exceptions, for
+          further code size decrease when compiling for C++.
+        - add throw () to callbacks that must not throw exceptions (allocator,
+          syserr, loop acquire/release, periodic reschedule cbs).
        - fix event_base_loop return code, add event_get_callback, event_base_new,
           event_base_get_method calls to improve libevent 1.x emulation and add
           some libevent 2.x funcitonality (based on a patch by Jeff Davey).
diff --git a/ev.c b/ev.c
index 98e90248f3bbd20db7f80474bf4d127a205162bd..cc8285d3078777c5599951b0676b0da0898f3f10 100644 (file)
--- a/ev.c
+++ b/ev.c
@@ -2321,7 +2321,7 @@ loop_init (EV_P_ unsigned int flags) EV_THROW
 
 /* free up a loop structure */
 void ecb_cold
-ev_loop_destroy (EV_P) EV_THROW
+ev_loop_destroy (EV_P)
 {
   int i;
 
diff --git a/ev.h b/ev.h
index 8cf95de18ea1fb0341f9f0a0a183d2b6b782f442..a8973abf7d1ff5777d91f217293055f11b827463 100644 (file)
--- a/ev.h
+++ b/ev.h
@@ -595,7 +595,7 @@ ev_is_default_loop (void) EV_THROW
 #endif /* multiplicity */
 
 /* destroy event loops, also works for the default loop */
-EV_API_DECL void ev_loop_destroy (EV_P) EV_THROW;
+EV_API_DECL void ev_loop_destroy (EV_P);
 
 /* this needs to be called after fork, to duplicate the loop */
 /* when you want to re-use it in the child */
diff --git a/ev.pod b/ev.pod
index f2589990f6da4237cfa82a2a0526811417c3bc92..6659cdd9a419fbba2560f3f81738e6189efb9f1e 100644 (file)
--- a/ev.pod
+++ b/ev.pod
@@ -3923,7 +3923,8 @@ and C++ you can use the C<EV_THROW> macro for this:
    ev_set_syserr_cb (fatal_error);
 
 The only API functions that can currently throw exceptions are C<ev_run>,
-C<ev_inoke> and C<ev_invoke_pending>.
+C<ev_inoke>, C<ev_invoke_pending> and C<ev_loop_destroy> (the latter
+because it runs cleanup watchers).
 
 Throwing exceptions in watcher callbacks is only supported if libev itself
 is compiled with a C++ compiler or your C and C++ environments allow
index 667a98632976d39fd5777d5791b3f6ff42f0964f..5cd26d0e13b0ed2d60b139be043afcc649eba4fd 100644 (file)
--- a/ev_vars.h
+++ b/ev_vars.h
@@ -196,8 +196,8 @@ VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */
 VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */
 
 VARx(void *, userdata)
-VAR (release_cb, void (*release_cb)(EV_P))
-VAR (acquire_cb, void (*acquire_cb)(EV_P))
+VAR (release_cb, void (*release_cb)(EV_P) EV_THROW)
+VAR (acquire_cb, void (*acquire_cb)(EV_P) EV_THROW)
 VAR (invoke_cb , void (*invoke_cb) (EV_P))
 #endif