summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <[email protected]>2016-01-22 13:30:17 -0500
committerNick Mathewson <[email protected]>2016-02-19 13:19:31 -0500
commit134f855adc18ace293347cf5316ca34177dfe10d (patch)
tree6e76470bebdc98ad788a0059747c68e89a7e940c
parentbafeec9c64b31f30635f38cfc672fe3727c1ed2b (diff)
Enable user code to override struct timeout_cb
I've found that frequently a void function and a pointer are either more or less than we want to attach to each timeout object. This patch makes it so that the user can define TIMEOUT_CB_OVERRIDE to indicate that they have included their own definition of struct timeout_cb.
-rw-r--r--timeout.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/timeout.h b/timeout.h
index 97a5feb..ee0180d 100644
--- a/timeout.h
+++ b/timeout.h
@@ -88,11 +88,12 @@ typedef uint64_t timeout_t;
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#ifndef TIMEOUT_CB_OVERRIDE
struct timeout_cb {
void (*fn)();
void *arg;
}; /* struct timeout_cb */
-
+#endif
/*
* T I M E O U T I N T E R F A C E S