summaryrefslogtreecommitdiff
path: root/src/compat52.h
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-04-04 16:29:15 +1000
committerdaurnimator <quae@daurnimator.com>2017-04-04 17:27:01 +1000
commit59766e63abfeb30342d413777b507940a739cc97 (patch)
treeeff376dfe6062a5e0cd4692767716fa08aca8f7c /src/compat52.h
parent62f401c31942d16c1b28ebb528ca0f444a2b9af3 (diff)
downloadluaossl-59766e63abfeb30342d413777b507940a739cc97.tar.gz
luaossl-59766e63abfeb30342d413777b507940a739cc97.tar.bz2
luaossl-59766e63abfeb30342d413777b507940a739cc97.zip
Bind SSL_CTX_set_tlsext_servername_callback
Closes #84
Diffstat (limited to 'src/compat52.h')
-rw-r--r--src/compat52.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compat52.h b/src/compat52.h
index 163aecb..9b0a48e 100644
--- a/src/compat52.h
+++ b/src/compat52.h
@@ -29,6 +29,16 @@
29 29
30#define lua_getfield(L, i, f) (lua_getfield(L, (i), (f)), lua_type(L, -1)) 30#define lua_getfield(L, i, f) (lua_getfield(L, (i), (f)), lua_type(L, -1))
31 31
32static int lua_isinteger(lua_State *L, int index) {
33 if (lua_type(L, index) == LUA_TNUMBER) {
34 lua_Number n = lua_tonumber(L, index);
35 lua_Integer i = lua_tointeger(L, index);
36 if (i == n)
37 return 1;
38 }
39 return 0;
40}
41
32#endif 42#endif
33 43
34#if LUA_VERSION_NUM < 502 44#if LUA_VERSION_NUM < 502