commit e636de5934692e6f781641da38f52f7b959d4a07
Author: Nathaniel McCallum <npmccallum(a)redhat.com>
Date: Mon Aug 15 16:54:50 2011 -0400
[all] rename verto_ev_ctx => verto_ctx for shortness
src/verto-glib.c | 6 ++--
src/verto-glib.h | 6 ++--
src/verto-libev.c | 6 ++--
src/verto-libev.h | 6 ++--
src/verto-libevent.c | 6 ++--
src/verto-libevent.h | 6 ++--
src/verto-module.h | 18 ++++++------
src/verto-tevent.c | 6 ++--
src/verto-tevent.h | 6 ++--
src/verto.c | 48 +++++++++++++++++-----------------
src/verto.h | 70 +++++++++++++++++++++++++-------------------------
tests/child.c | 8 +++---
tests/idle.c | 8 +++---
tests/read.c | 6 ++--
tests/signal.c | 6 ++--
tests/test.h | 4 +-
tests/timeout.c | 6 ++--
tests/write.c | 10 +++---
18 files changed, 116 insertions(+), 116 deletions(-)
---
diff --git a/src/verto-glib.c b/src/verto-glib.c
index bb05dcc..32ce0cb 100644
--- a/src/verto-glib.c
+++ b/src/verto-glib.c
@@ -244,17 +244,17 @@ glib_ctx_del(void *lp, const verto_ev *ev, void *evpriv)
VERTO_MODULE(glib, g_main_context_default, VERTO_GLIB_SUPPORTED_TYPES);
-verto_ev_ctx *
+verto_ctx *
verto_new_glib() {
return verto_convert_glib(g_main_context_new(), NULL);
}
-verto_ev_ctx *
+verto_ctx *
verto_default_glib() {
return verto_convert_glib(g_main_context_default(), NULL);
}
-verto_ev_ctx *
+verto_ctx *
verto_convert_glib(GMainContext *mc, GMainLoop *ml)
{
return verto_convert(glib, glib_convert_(mc, ml));
diff --git a/src/verto-glib.h b/src/verto-glib.h
index e123cb0..a05a921 100644
--- a/src/verto-glib.h
+++ b/src/verto-glib.h
@@ -28,8 +28,8 @@
#include <verto.h>
#include <glib.h>
-verto_ev_ctx *verto_new_glib();
-verto_ev_ctx *verto_default_glib();
+verto_ctx *verto_new_glib();
+verto_ctx *verto_default_glib();
/**
* mc == NULL, ml == NULL -- Use the default main loop
@@ -37,6 +37,6 @@ verto_ev_ctx *verto_default_glib();
* If mc is specified, a reference is stolen unless mc is the default loop.
* A reference is always stolen for ml.
*/
-verto_ev_ctx *verto_convert_glib(GMainContext *mc, GMainLoop *ml);
+verto_ctx *verto_convert_glib(GMainContext *mc, GMainLoop *ml);
#endif /* VERTO_GLIB_H_ */
diff --git a/src/verto-libev.c b/src/verto-libev.c
index c661231..64693ae 100644
--- a/src/verto-libev.c
+++ b/src/verto-libev.c
@@ -134,19 +134,19 @@ VERTO_MODULE(libev, ev_loop_new,
VERTO_EV_TYPE_SIGNAL |
VERTO_EV_TYPE_CHILD);
-verto_ev_ctx *
+verto_ctx *
verto_new_libev()
{
return verto_convert_libev(ev_loop_new(EVFLAG_AUTO));
}
-verto_ev_ctx *
+verto_ctx *
verto_default_libev()
{
return verto_convert_libev(ev_default_loop(EVFLAG_AUTO));
}
-verto_ev_ctx *
+verto_ctx *
verto_convert_libev(struct ev_loop* loop)
{
return verto_convert(libev, loop);
diff --git a/src/verto-libev.h b/src/verto-libev.h
index b1492a6..fecae6a 100644
--- a/src/verto-libev.h
+++ b/src/verto-libev.h
@@ -28,8 +28,8 @@
#include <verto.h>
#include <ev.h>
-verto_ev_ctx *verto_new_libev();
-verto_ev_ctx *verto_default_libev();
-verto_ev_ctx *verto_convert_libev(struct ev_loop* loop);
+verto_ctx *verto_new_libev();
+verto_ctx *verto_default_libev();
+verto_ctx *verto_convert_libev(struct ev_loop* loop);
#endif /* VERTO_LIBEV_H_ */
diff --git a/src/verto-libevent.c b/src/verto-libevent.c
index 15c344d..179f060 100644
--- a/src/verto-libevent.c
+++ b/src/verto-libevent.c
@@ -131,13 +131,13 @@ VERTO_MODULE(libevent, event_base_init,
VERTO_EV_TYPE_TIMEOUT |
VERTO_EV_TYPE_SIGNAL);
-verto_ev_ctx *
+verto_ctx *
verto_new_libevent()
{
return verto_convert_libevent(event_base_new());
}
-verto_ev_ctx *
+verto_ctx *
verto_default_libevent()
{
if (!event_global_current_base_)
@@ -145,7 +145,7 @@ verto_default_libevent()
return verto_convert_libevent(event_global_current_base_);
}
-verto_ev_ctx *
+verto_ctx *
verto_convert_libevent(struct event_base* base)
{
event_base_priority_init(base, 3);
diff --git a/src/verto-libevent.h b/src/verto-libevent.h
index c88fd44..8793b75 100644
--- a/src/verto-libevent.h
+++ b/src/verto-libevent.h
@@ -28,8 +28,8 @@
#include <verto.h>
#include <event2/event.h>
-verto_ev_ctx *verto_new_libevent();
-verto_ev_ctx *verto_default_libevent();
-verto_ev_ctx *verto_convert_libevent(struct event_base *ebase);
+verto_ctx *verto_new_libevent();
+verto_ctx *verto_default_libevent();
+verto_ctx *verto_convert_libevent(struct event_base *ebase);
#endif /* VERTO_LIBEVENT_H_ */
diff --git a/src/verto-module.h b/src/verto-module.h
index 93f58a9..89d6e56 100644
--- a/src/verto-module.h
+++ b/src/verto-module.h
@@ -32,7 +32,7 @@
#define VERTO_MODULE_VERSION 1
#define VERTO_MODULE_TABLE verto_module_table
#define VERTO_MODULE(name, symb, types) \
- static verto_ev_ctx_funcs name ## _funcs = { \
+ static verto_ctx_funcs name ## _funcs = { \
name ## _ctx_free, \
name ## _ctx_run, \
name ## _ctx_run_once, \
@@ -49,15 +49,15 @@
verto_default_ ## name, \
};
-typedef verto_ev_ctx *(*verto_ev_ctx_constructor)();
+typedef verto_ctx *(*verto_ctx_constructor)();
typedef struct {
unsigned int vers;
const char *name;
const char *symb;
verto_ev_type types;
- verto_ev_ctx_constructor new_ctx;
- verto_ev_ctx_constructor def_ctx;
+ verto_ctx_constructor new_ctx;
+ verto_ctx_constructor def_ctx;
} verto_module;
typedef struct {
@@ -67,10 +67,10 @@ typedef struct {
void (*ctx_break)(void *ctx);
void *(*ctx_add)(void *ctx, const verto_ev *ev, verto_ev_flag *flags);
void (*ctx_del)(void *ctx, const verto_ev *ev, void *evpriv);
-} verto_ev_ctx_funcs;
+} verto_ctx_funcs;
/**
- * Converts an existing implementation specific loop to a verto_ev_ctx.
+ * Converts an existing implementation specific loop to a verto_ctx.
*
* This function also sets the internal default implementation so that future
* calls to verto_new(NULL) or verto_default(NULL) will use this specific
@@ -84,7 +84,7 @@ typedef struct {
verto_convert_funcs(&name ## _funcs, &VERTO_MODULE_TABLE, priv)
/**
- * Converts an existing implementation specific loop to a verto_ev_ctx.
+ * Converts an existing implementation specific loop to a verto_ctx.
*
* This function also sets the internal default implementation so that future
* calls to verto_new(NULL) or verto_default(NULL) will use this specific
@@ -98,8 +98,8 @@ typedef struct {
* @param priv The context private to store
* @return A new _ev_ctx, or NULL on error. Call verto_free() when done.
*/
-verto_ev_ctx *
-verto_convert_funcs(const verto_ev_ctx_funcs *funcs,
+verto_ctx *
+verto_convert_funcs(const verto_ctx_funcs *funcs,
const verto_module *module,
void *priv);
diff --git a/src/verto-tevent.c b/src/verto-tevent.c
index 05029dd..751c5c9 100644
--- a/src/verto-tevent.c
+++ b/src/verto-tevent.c
@@ -125,13 +125,13 @@ VERTO_MODULE(tevent, g_main_context_default,
VERTO_EV_TYPE_TIMEOUT |
VERTO_EV_TYPE_SIGNAL);
-verto_ev_ctx *
+verto_ctx *
verto_new_tevent()
{
return verto_convert_tevent(tevent_context_init(NULL));
}
-verto_ev_ctx *
+verto_ctx *
verto_default_tevent()
{
if (!defctx)
@@ -139,7 +139,7 @@ verto_default_tevent()
return verto_convert_tevent(defctx);
}
-verto_ev_ctx *
+verto_ctx *
verto_convert_tevent(struct tevent_context *context)
{
tevent_ev_ctx *ctx;
diff --git a/src/verto-tevent.h b/src/verto-tevent.h
index 6811d21..1afecc7 100644
--- a/src/verto-tevent.h
+++ b/src/verto-tevent.h
@@ -28,8 +28,8 @@
#include <verto.h>
#include <tevent.h>
-verto_ev_ctx *verto_new_tevent();
-verto_ev_ctx *verto_default_tevent();
-verto_ev_ctx *verto_convert_tevent(struct tevent_context *context);
+verto_ctx *verto_new_tevent();
+verto_ctx *verto_default_tevent();
+verto_ctx *verto_convert_tevent(struct tevent_context *context);
#endif /* VERTO_TEVENT_H_ */
diff --git a/src/verto.c b/src/verto.c
index 1a12900..f59e8ba 100644
--- a/src/verto.c
+++ b/src/verto.c
@@ -147,11 +147,11 @@ pdladdrmodname(void *addr, char **buf) {
#define vnew(type) ((type*) malloc(sizeof(type)))
#define vnew0(type) ((type*) memset(vnew(type), 0, sizeof(type)))
-struct _verto_ev_ctx {
+struct _verto_ctx {
void *dll;
void *modpriv;
verto_ev_type types;
- verto_ev_ctx_funcs funcs;
+ verto_ctx_funcs funcs;
verto_ev *events;
};
@@ -162,7 +162,7 @@ typedef struct {
struct _verto_ev {
verto_ev *next;
- verto_ev_ctx *ctx;
+ verto_ctx *ctx;
verto_ev_type type;
verto_callback *callback;
verto_callback *onfree;
@@ -371,7 +371,7 @@ load_module(const char *impl, verto_ev_type reqtypes, pdlmtype *dll,
}
static verto_ev *
-make_ev(verto_ev_ctx *ctx, verto_callback *callback,
+make_ev(verto_ctx *ctx, verto_callback *callback,
verto_ev_type type, verto_ev_flag flags)
{
verto_ev *ev = NULL;
@@ -392,7 +392,7 @@ make_ev(verto_ev_ctx *ctx, verto_callback *callback,
}
static void
-push_ev(verto_ev_ctx *ctx, verto_ev *ev)
+push_ev(verto_ctx *ctx, verto_ev *ev)
{
if (!ctx || !ev)
return;
@@ -415,16 +415,16 @@ remove_ev(verto_ev **origin, verto_ev *item)
}
static void
-signal_ignore(verto_ev_ctx *ctx, verto_ev *ev)
+signal_ignore(verto_ctx *ctx, verto_ev *ev)
{
}
-verto_ev_ctx *
+verto_ctx *
verto_new(const char *impl, verto_ev_type reqtypes)
{
pdlmtype dll = NULL;
const verto_module *module = NULL;
- verto_ev_ctx *ctx = NULL;
+ verto_ctx *ctx = NULL;
if (!load_module(impl, reqtypes, &dll, &module))
return NULL;
@@ -438,12 +438,12 @@ verto_new(const char *impl, verto_ev_type reqtypes)
return ctx;
}
-verto_ev_ctx *
+verto_ctx *
verto_default(const char *impl, verto_ev_type reqtypes)
{
pdlmtype dll = NULL;
const verto_module *module = NULL;
- verto_ev_ctx *ctx = NULL;
+ verto_ctx *ctx = NULL;
if (!load_module(impl, reqtypes, &dll, &module))
return NULL;
@@ -465,7 +465,7 @@ verto_set_default(const char *impl, verto_ev_type reqtypes)
}
void
-verto_free(verto_ev_ctx *ctx)
+verto_free(verto_ctx *ctx)
{
#ifndef WIN32
int i;
@@ -520,7 +520,7 @@ verto_free(verto_ev_ctx *ctx)
}
void
-verto_run(verto_ev_ctx *ctx)
+verto_run(verto_ctx *ctx)
{
if (!ctx)
return;
@@ -528,7 +528,7 @@ verto_run(verto_ev_ctx *ctx)
}
void
-verto_run_once(verto_ev_ctx *ctx)
+verto_run_once(verto_ctx *ctx)
{
if (!ctx)
return;
@@ -536,7 +536,7 @@ verto_run_once(verto_ev_ctx *ctx)
}
void
-verto_break(verto_ev_ctx *ctx)
+verto_break(verto_ctx *ctx)
{
if (!ctx)
return;
@@ -558,7 +558,7 @@ verto_break(verto_ev_ctx *ctx)
return ev;
verto_ev *
-verto_add_io(verto_ev_ctx *ctx, verto_ev_flag flags,
+verto_add_io(verto_ctx *ctx, verto_ev_flag flags,
verto_callback *callback, int fd)
{
if (fd < 0 || !(flags & (VERTO_EV_FLAG_IO_READ | VERTO_EV_FLAG_IO_WRITE)))
@@ -567,21 +567,21 @@ verto_add_io(verto_ev_ctx *ctx, verto_ev_flag flags,
}
verto_ev *
-verto_add_timeout(verto_ev_ctx *ctx, verto_ev_flag flags,
+verto_add_timeout(verto_ctx *ctx, verto_ev_flag flags,
verto_callback *callback, time_t interval)
{
doadd(ev->option.interval = interval, VERTO_EV_TYPE_TIMEOUT);
}
verto_ev *
-verto_add_idle(verto_ev_ctx *ctx, verto_ev_flag flags,
+verto_add_idle(verto_ctx *ctx, verto_ev_flag flags,
verto_callback *callback)
{
doadd(, VERTO_EV_TYPE_IDLE);
}
verto_ev *
-verto_add_signal(verto_ev_ctx *ctx, verto_ev_flag flags,
+verto_add_signal(verto_ctx *ctx, verto_ev_flag flags,
verto_callback *callback, int signal)
{
if (signal < 0)
@@ -599,7 +599,7 @@ verto_add_signal(verto_ev_ctx *ctx, verto_ev_flag flags,
}
verto_ev *
-verto_add_child(verto_ev_ctx *ctx, verto_ev_flag flags,
+verto_add_child(verto_ctx *ctx, verto_ev_flag flags,
verto_callback *callback, verto_proc proc)
{
if (flags & VERTO_EV_FLAG_PERSIST) /* persist makes no sense */
@@ -703,24 +703,24 @@ verto_del(verto_ev *ev)
}
verto_ev_type
-verto_get_supported_types(verto_ev_ctx *ctx)
+verto_get_supported_types(verto_ctx *ctx)
{
return ctx->types;
}
/*** THE FOLLOWING ARE FOR IMPLEMENTATION MODULES ONLY ***/
-verto_ev_ctx *
-verto_convert_funcs(const verto_ev_ctx_funcs *funcs,
+verto_ctx *
+verto_convert_funcs(const verto_ctx_funcs *funcs,
const verto_module *module,
void *ctx_private)
{
- verto_ev_ctx *ctx = NULL;
+ verto_ctx *ctx = NULL;
if (!funcs || !module || !ctx_private)
return NULL;
- ctx = vnew0(verto_ev_ctx);
+ ctx = vnew0(verto_ctx);
if (!ctx)
return NULL;
diff --git a/src/verto.h b/src/verto.h
index 9c5cd25..452638d 100644
--- a/src/verto.h
+++ b/src/verto.h
@@ -39,7 +39,7 @@ typedef int verto_proc_status;
#define VERTO_SIG_IGN ((verto_callback *) 1)
-typedef struct _verto_ev_ctx verto_ev_ctx;
+typedef struct _verto_ctx verto_ctx;
typedef struct _verto_ev verto_ev;
typedef enum {
@@ -62,7 +62,7 @@ typedef enum {
_VERTO_EV_FLAG_MAX = VERTO_EV_FLAG_IO_WRITE
} verto_ev_flag;
-typedef void (verto_callback)(verto_ev_ctx *ctx, verto_ev *ev);
+typedef void (verto_callback)(verto_ctx *ctx, verto_ev *ev);
/**
* Creates a new event context using an optionally specified implementation
@@ -74,7 +74,7 @@ typedef void (verto_callback)(verto_ev_ctx *ctx, verto_ev *ev);
* NAME is the implementation you wish to use.
*
* If you are a library, you should generally avoid creating event contexts
- * on your own but allow applications to pass in a verto_ev_ctx you can use.
+ * on your own but allow applications to pass in a verto_ctx you can use.
*
* There are two cases where you should use this function. The first is
* where you have a need to choose an implementation at run time, usually
@@ -120,7 +120,7 @@ typedef void (verto_callback)(verto_ev_ctx *ctx, verto_ev *ev);
* @param reqtypes A bitwise or'd list of required event type features.
* @return A new _ev_ctx, or NULL on error. Call verto_free() when done.
*/
-verto_ev_ctx *
+verto_ctx *
verto_new(const char *impl, verto_ev_type reqtypes);
/**
@@ -131,7 +131,7 @@ verto_new(const char *impl, verto_ev_type reqtypes);
* the underlying implementation (if such a function exists), it is NOT a
* global singleton, but a per-implementation singleton. For this reason, you
* must call verto_free() when you are done with this loop. Even after calling
- * verto_free() on the default verto_ev_ctx, you can safely call verto_default()
+ * verto_free() on the default verto_ctx, you can safely call verto_default()
* again and receive a new reference to the same (internally default) loop.
*
* In all other respects, verto_default() acts exactly like verto_new().
@@ -142,7 +142,7 @@ verto_new(const char *impl, verto_ev_type reqtypes);
* @param reqtypes A bitwise or'd list of required event type features.
* @return The default _ev_ctx, or NULL on error. Call verto_free() when done.
*/
-verto_ev_ctx *
+verto_ctx *
verto_default(const char *impl, verto_ev_type reqtypes);
/**
@@ -170,49 +170,49 @@ int
verto_set_default(const char *impl, verto_ev_type reqtypes);
/**
- * Frees a verto_ev_ctx.
+ * Frees a verto_ctx.
*
- * When called on a default verto_ev_ctx, the reference will be freed but the
+ * When called on a default verto_ctx, the reference will be freed but the
* internal default loop will still be available via another call to
* verto_default().
*
* @see verto_new()
* @see verto_default()
- * @param ctx The verto_ev_ctx to free.
+ * @param ctx The verto_ctx to free.
*/
void
-verto_free(verto_ev_ctx *ctx);
+verto_free(verto_ctx *ctx);
/**
- * Run the verto_ev_ctx forever, or at least until verto_break() is called.
+ * Run the verto_ctx forever, or at least until verto_break() is called.
*
* @see verto_break()
- * @param ctx The verto_ev_ctx to run.
+ * @param ctx The verto_ctx to run.
*/
void
-verto_run(verto_ev_ctx *ctx);
+verto_run(verto_ctx *ctx);
/**
- * Run the verto_ev_ctx once. May block.
+ * Run the verto_ctx once. May block.
*
- * @param ctx The verto_ev_ctx to run once.
+ * @param ctx The verto_ctx to run once.
*/
void
-verto_run_once(verto_ev_ctx *ctx);
+verto_run_once(verto_ctx *ctx);
/**
- * Exits the currently running verto_ev_ctx.
+ * Exits the currently running verto_ctx.
*
* @see verto_run()
- * @param ctx The verto_ev_ctx to exit.
+ * @param ctx The verto_ctx to exit.
*/
void
-verto_break(verto_ev_ctx *ctx);
+verto_break(verto_ctx *ctx);
/**
* Adds a callback executed when a file descriptor is ready to be read/written.
*
- * All verto_ev events are automatically freed when their parent verto_ev_ctx is
+ * All verto_ev events are automatically freed when their parent verto_ctx is
* freed. You do not need to free them manually. If VERTO_EV_FLAG_PERSIST is
* provided, the event will repeat until verto_del() is called. If
* VERTO_EV_FLAG_PERSIST is not provided, the event will be freed automatically
@@ -224,20 +224,20 @@ verto_break(verto_ev_ctx *ctx);
* results and may even crash.
*
* @see verto_del()
- * @param ctx The verto_ev_ctx which will fire the callback.
+ * @param ctx The verto_ctx which will fire the callback.
* @param flags The flags to set (at least one VERTO_EV_FLAG_IO* required).
* @param callback The callback to fire.
* @param fd The file descriptor to watch for reads.
* @return The verto_ev registered with the event context or NULL on error.
*/
verto_ev *
-verto_add_io(verto_ev_ctx *ctx, verto_ev_flag flags,
+verto_add_io(verto_ctx *ctx, verto_ev_flag flags,
verto_callback *callback, int fd);
/**
* Adds a callback executed after a period of time.
*
- * All verto_ev events are automatically freed when their parent verto_ev_ctx is
+ * All verto_ev events are automatically freed when their parent verto_ctx is
* freed. You do not need to free them manually. If VERTO_EV_FLAG_PERSIST is
* provided, the event will repeat until verto_del() is called. If
* VERTO_EV_FLAG_PERSIST is not provided, the event will be freed automatically
@@ -245,20 +245,20 @@ verto_add_io(verto_ev_ctx *ctx, verto_ev_flag flags,
* to prevent the event from executing.
*
* @see verto_del()
- * @param ctx The verto_ev_ctx which will fire the callback.
+ * @param ctx The verto_ctx which will fire the callback.
* @param flags The flags to set.
* @param callback The callback to fire.
* @param interval Time period to wait before firing (in milliseconds).
* @return The verto_ev registered with the event context.
*/
verto_ev *
-verto_add_timeout(verto_ev_ctx *ctx, verto_ev_flag flags,
+verto_add_timeout(verto_ctx *ctx, verto_ev_flag flags,
verto_callback *callback, time_t interval);
/**
* Adds a callback executed when there is nothing else to do.
*
- * All verto_ev events are automatically freed when their parent verto_ev_ctx is
+ * All verto_ev events are automatically freed when their parent verto_ctx is
* freed. You do not need to free them manually. If VERTO_EV_FLAG_PERSIST is
* provided, the event will repeat until verto_del() is called. If
* VERTO_EV_FLAG_PERSIST is not provided, the event will be freed automatically
@@ -266,19 +266,19 @@ verto_add_timeout(verto_ev_ctx *ctx, verto_ev_flag flags,
* to prevent the event from executing.
*
* @see verto_del()
- * @param ctx The verto_ev_ctx which will fire the callback.
+ * @param ctx The verto_ctx which will fire the callback.
* @param flags The flags to set.
* @param callback The callback to fire.
* @return The verto_ev registered with the event context.
*/
verto_ev *
-verto_add_idle(verto_ev_ctx *ctx, verto_ev_flag flags,
+verto_add_idle(verto_ctx *ctx, verto_ev_flag flags,
verto_callback *callback);
/**
* Adds a callback executed when a signal is received.
*
- * All verto_ev events are automatically freed when their parent verto_ev_ctx is
+ * All verto_ev events are automatically freed when their parent verto_ctx is
* freed. You do not need to free them manually. If VERTO_EV_FLAG_PERSIST is
* provided, the event will repeat until verto_del() is called. If
* VERTO_EV_FLAG_PERSIST is not provided, the event will be freed automatically
@@ -303,14 +303,14 @@ verto_add_idle(verto_ev_ctx *ctx, verto_ev_flag flags,
* @see verto_add_child()
* @see verto_repeat()
* @see verto_del()
- * @param ctx The verto_ev_ctx which will fire the callback.
+ * @param ctx The verto_ctx which will fire the callback.
* @param flags The flags to set.
* @param callback The callback to fire.
* @param signal The signal to watch for.
* @return The verto_ev registered with the event context.
*/
verto_ev *
-verto_add_signal(verto_ev_ctx *ctx, verto_ev_flag flags,
+verto_add_signal(verto_ctx *ctx, verto_ev_flag flags,
verto_callback *callback, int signal);
/**
@@ -323,14 +323,14 @@ verto_add_signal(verto_ev_ctx *ctx, verto_ev_flag flags,
* prevent the callback from firing.
*
* @see verto_del()
- * @param ctx The verto_ev_ctx which will fire the callback.
+ * @param ctx The verto_ctx which will fire the callback.
* @param flags The flags to set.
* @param callback The callback to fire.
* @param child The pid (POSIX) or handle (Win32) of the child to watch for.
* @return The verto_ev registered with the event context.
*/
verto_ev *
-verto_add_child(verto_ev_ctx *ctx, verto_ev_flag flags,
+verto_add_child(verto_ctx *ctx, verto_ev_flag flags,
verto_callback *callback, verto_proc proc);
/**
@@ -456,10 +456,10 @@ verto_del(verto_ev *ev);
/**
* Returns the event types supported by this implementation.
*
- * @param ctx The verto_ev_ctx to query.
+ * @param ctx The verto_ctx to query.
* @return The event types supported.
*/
verto_ev_type
-verto_get_supported_types(verto_ev_ctx *ctx);
+verto_get_supported_types(verto_ctx *ctx);
#endif /* VERTO_H_ */
diff --git a/tests/child.c b/tests/child.c
index bc6f936..7c4038c 100644
--- a/tests/child.c
+++ b/tests/child.c
@@ -34,7 +34,7 @@ static int exitstatus;
static int freed;
void
-exit_cb(verto_ev_ctx *ctx, verto_ev *ev)
+exit_cb(verto_ctx *ctx, verto_ev *ev)
{
if (WEXITSTATUS(exitstatus) != EXITCODE) {
printf("ERROR: Child event never fired!\n");
@@ -49,19 +49,19 @@ exit_cb(verto_ev_ctx *ctx, verto_ev *ev)
}
void
-onfree(verto_ev_ctx *ctx, verto_ev *ev)
+onfree(verto_ctx *ctx, verto_ev *ev)
{
freed = 1;
}
void
-cb(verto_ev_ctx *ctx, verto_ev *ev)
+cb(verto_ctx *ctx, verto_ev *ev)
{
exitstatus = verto_get_proc_status(ev);
}
int
-do_test(verto_ev_ctx *ctx)
+do_test(verto_ctx *ctx)
{
pid_t pid;
exitstatus = 0;
diff --git a/tests/idle.c b/tests/idle.c
index cf608fd..00af6af 100644
--- a/tests/idle.c
+++ b/tests/idle.c
@@ -27,7 +27,7 @@
static int callcount;
void
-exit_cb(verto_ev_ctx *ctx, verto_ev *ev)
+exit_cb(verto_ctx *ctx, verto_ev *ev)
{
retval = 1;
switch (callcount) {
@@ -54,12 +54,12 @@ exit_cb(verto_ev_ctx *ctx, verto_ev *ev)
}
void
-onfree(verto_ev_ctx *ctx, verto_ev *ev) {
+onfree(verto_ctx *ctx, verto_ev *ev) {
++callcount;
}
void
-cb(verto_ev_ctx *ctx, verto_ev *ev)
+cb(verto_ctx *ctx, verto_ev *ev)
{
if (++callcount == 2) {
assert(verto_set_private(verto_add_idle(ctx, VERTO_EV_FLAG_NONE, cb),
@@ -69,7 +69,7 @@ cb(verto_ev_ctx *ctx, verto_ev *ev)
}
int
-do_test(verto_ev_ctx *ctx)
+do_test(verto_ctx *ctx)
{
callcount = 0;
diff --git a/tests/read.c b/tests/read.c
index 47f634c..0d32084 100644
--- a/tests/read.c
+++ b/tests/read.c
@@ -39,7 +39,7 @@ static int fds[2];
static int callcount = 0;
static void
-timeout_cb(verto_ev_ctx *ctx, verto_ev *ev)
+timeout_cb(verto_ctx *ctx, verto_ev *ev)
{
printf("ERROR: Timeout!\n");
if (fds[0] >= 0)
@@ -52,7 +52,7 @@ timeout_cb(verto_ev_ctx *ctx, verto_ev *ev)
}
static void
-cb(verto_ev_ctx *ctx, verto_ev *ev)
+cb(verto_ctx *ctx, verto_ev *ev)
{
unsigned char buff[DATALEN];
int fd = 0;
@@ -77,7 +77,7 @@ cb(verto_ev_ctx *ctx, verto_ev *ev)
}
int
-do_test(verto_ev_ctx *ctx)
+do_test(verto_ctx *ctx)
{
callcount = 0;
fds[0] = -1;
diff --git a/tests/signal.c b/tests/signal.c
index 7e82cb5..770f3b2 100644
--- a/tests/signal.c
+++ b/tests/signal.c
@@ -33,7 +33,7 @@
static int count;
void
-exit_cb(verto_ev_ctx *ctx, verto_ev *ev)
+exit_cb(verto_ctx *ctx, verto_ev *ev)
{
if ((pid_t) (uintptr_t) verto_get_private(ev) != 0)
waitpid((pid_t) (uintptr_t) verto_get_private(ev), NULL, 0);
@@ -53,13 +53,13 @@ exit_cb(verto_ev_ctx *ctx, verto_ev *ev)
}
void
-cb(verto_ev_ctx *ctx, verto_ev *ev)
+cb(verto_ctx *ctx, verto_ev *ev)
{
count++;
}
int
-do_test(verto_ev_ctx *ctx)
+do_test(verto_ctx *ctx)
{
pid_t pid = 0;
count = 0;
diff --git a/tests/test.h b/tests/test.h
index 50eb529..b481037 100644
--- a/tests/test.h
+++ b/tests/test.h
@@ -46,7 +46,7 @@ static char *MODULES[] = {
NULL
};
-int do_test(verto_ev_ctx *ctx);
+int do_test(verto_ctx *ctx);
static int retval = 0;
@@ -54,7 +54,7 @@ int
main(int argc, char **argv)
{
int i;
- verto_ev_ctx *ctx;
+ verto_ctx *ctx;
if (argc == 2) {
MODULES[0] = argv[1];
diff --git a/tests/timeout.c b/tests/timeout.c
index 439597f..82ebd0a 100644
--- a/tests/timeout.c
+++ b/tests/timeout.c
@@ -55,14 +55,14 @@ elapsed(time_t min, time_t max)
}
static void
-exit_cb(verto_ev_ctx *ctx, verto_ev *ev)
+exit_cb(verto_ctx *ctx, verto_ev *ev)
{
assert(callcount == 3);
verto_break(ctx);
}
static void
-cb(verto_ev_ctx *ctx, verto_ev *ev)
+cb(verto_ctx *ctx, verto_ev *ev)
{
assert(elapsed(SLEEP_MIN, SLEEP_MAX));
if (++callcount == 3)
@@ -74,7 +74,7 @@ cb(verto_ev_ctx *ctx, verto_ev *ev)
}
int
-do_test(verto_ev_ctx *ctx)
+do_test(verto_ctx *ctx)
{
callcount = 0;
diff --git a/tests/write.c b/tests/write.c
index ae23951..97b00e3 100644
--- a/tests/write.c
+++ b/tests/write.c
@@ -39,7 +39,7 @@ static int fds[2];
static int callcount = 0;
static void
-timeout_cb(verto_ev_ctx *ctx, verto_ev *ev)
+timeout_cb(verto_ctx *ctx, verto_ev *ev)
{
printf("ERROR: Timeout!\n");
if (fds[0] >= 0)
@@ -52,7 +52,7 @@ timeout_cb(verto_ev_ctx *ctx, verto_ev *ev)
}
static void
-error_cb(verto_ev_ctx *ctx, verto_ev *ev)
+error_cb(verto_ctx *ctx, verto_ev *ev)
{
int fd = 0;
@@ -65,7 +65,7 @@ error_cb(verto_ev_ctx *ctx, verto_ev *ev)
}
static void
-read_cb(verto_ev_ctx *ctx, verto_ev *ev)
+read_cb(verto_ctx *ctx, verto_ev *ev)
{
unsigned char buff[DATALEN];
int fd = verto_get_fd(ev);
@@ -78,7 +78,7 @@ read_cb(verto_ev_ctx *ctx, verto_ev *ev)
}
static void
-write_cb(verto_ev_ctx *ctx, verto_ev *ev)
+write_cb(verto_ctx *ctx, verto_ev *ev)
{
int fd = 0;
@@ -89,7 +89,7 @@ write_cb(verto_ev_ctx *ctx, verto_ev *ev)
}
int
-do_test(verto_ev_ctx *ctx)
+do_test(verto_ctx *ctx)
{
callcount = 0;
fds[0] = -1;