summaryrefslogtreecommitdiff
path: root/ev.pod
diff options
context:
space:
mode:
authorroot <root>2007-12-19 01:59:29 +0000
committerroot <root>2007-12-19 01:59:29 +0000
commit065b91948ce4cb4043a4c915576eaaff624a199c (patch)
tree4cb26ef0bcbea1e530542bdfce24b43501fac6c0 /ev.pod
parent8f05d352659f0ea4f97f55ccfadfc322b72966bf (diff)
add and document Symbol.* files
Diffstat (limited to 'ev.pod')
-rw-r--r--ev.pod25
1 files changed, 25 insertions, 0 deletions
diff --git a/ev.pod b/ev.pod
index 901d76e..8f85af4 100644
--- a/ev.pod
+++ b/ev.pod
@@ -2447,6 +2447,31 @@ their default definitions. One possible use for overriding these is to
avoid the C<struct ev_loop *> as first argument in all cases, or to use
method calls instead of plain function calls in C++.
+=head2 EXPORTED API SYMBOLS
+
+If you need to re-export the API (e.g. via a dll) and you need a list of
+exported symbols, you can use the provided F<Symbol.*> files which list
+all public symbols, one per line:
+
+ Symbols.ev for libev proper
+ Symbols.event for the libevent emulation
+
+This can also be used to rename all public symbols to avoid clashes with
+multiple versions of libev linked together (which is obviously bad in
+itself, but sometimes it is inconvinient to avoid this).
+
+A sed comamnd like this will create wrapper C<#define>'s that you need to
+include before including F<ev.h>:
+
+ <Symbols.ev sed -e "s/.*/#define & myprefix_&/" >wrap.h
+
+This would create a file F<wrap.h> which essentially looks like this:
+
+ #define ev_backend myprefix_ev_backend
+ #define ev_check_start myprefix_ev_check_start
+ #define ev_check_stop myprefix_ev_check_stop
+ ...
+
=head2 EXAMPLES
For a real-world example of a program the includes libev