forked from gvanem/wsock-trace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwsock_trace_lua.h
36 lines (29 loc) · 992 Bytes
/
wsock_trace_lua.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
* A Lua interface for WSock-Trace.
*/
#ifndef _WSOCK_TRACE_LUA_H
#define _WSOCK_TRACE_LUA_H
#if defined(USE_LUA)
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
extern const char *wslua_func_sig;
extern BOOL wslua_DllMain (HINSTANCE instDLL, DWORD reason);
extern void wslua_init (const char *script);
extern void wslua_exit (const char *script);
extern void wslua_print_stack (void);
extern int wslua_WSAStartup (WORD ver, WSADATA *data);
extern int wslua_WSACleanup (void);
#if defined(_MSC_VER) && defined(__FUNCSIG__)
/*
* MSVC supports '__FUNCSIG__' and includes full list of arguments.
* E.g. in 'void foo(int bar)', __FUNCSIG__' gives "void foo(int bar)".
*/
#define WSLUA_HOOK(rc, func) wslua_func_sig = __FUNCSIG__, rc = func
#else
#define WSLUA_HOOK(rc, func) wslua_func_sig = __FUNCTION__, rc = func
#endif
#else
#define WSLUA_HOOK(rc, func) ((void)0)
#endif
#endif /* USE_LUA && !_WSOCK_TRACE_LUA_H */