/* module table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
#if defined(__linux__) || defined(BSD)
{"getifaddrs", nixio_getifaddrs},
#endif
};
/* object table */
-static const luaL_reg M[] = {
+static const luaL_Reg M[] = {
{"getsockname", nixio_sock_getsockname},
{"getpeername", nixio_sock_getpeername},
{NULL, NULL}
}
/* module table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
{"hexlify", nixio_bin_hexlify},
{"unhexlify", nixio_bin_unhexlify},
{"crc32", nixio_bin_crc32},
}
/* module table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
{"bind", nixio_bind},
{"connect", nixio_connect},
{NULL, NULL}
};
/* object table */
-static const luaL_reg M[] = {
+static const luaL_Reg M[] = {
{"bind", nixio_sock_bind},
{"connect", nixio_sock_connect},
{"listen", nixio_sock_listen},
}
/* module table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
{"bor", nixio_bit_or},
{"set", nixio_bit_or},
{"band", nixio_bit_and},
}
/* method table */
-static const luaL_reg M[] = {
+static const luaL_Reg M[] = {
{"write", nixio_file_write},
{"read", nixio_file_read},
{"tell", nixio_file_tell},
};
/* module table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
{"dup", nixio_dup},
{"open", nixio_open},
{"open_flags", nixio_open_flags},
/* module table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
#ifndef __WINNT__
{"glob", nixio_glob},
{"mkfifo", nixio_mkfifo},
/* module table */
-static const luaL_reg M[] = {
+static const luaL_Reg M[] = {
{"send", nixio_sock_send},
{"sendto", nixio_sock_sendto},
{"recv", nixio_sock_recv},
}
/* object table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
{"errno", nixio_errno},
{"strerror", nixio_strerror},
{NULL, NULL}
#include <lauxlib.h>
#include <luaconf.h>
+#if LUA_VERSION_NUM < 501
+#define luaL_Reg luaL_reg
+#endif
+
#define NIXIO_BUFFERSIZE 8192
typedef struct nixio_socket {
}
/* module table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
{"gettimeofday", nixio_gettimeofday},
{"nanosleep", nixio_nanosleep},
{"poll", nixio_poll},
/* module table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
#ifdef __linux__
{"sysinfo", nixio_sysinfo},
#endif
}
/* module table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
{"getprotobyname", nixio_getprotobyname},
{"getprotobynumber", nixio_getprotobynumber},
{"getproto", nixio_getproto},
}
/* module table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
{"socket", nixio_socket},
{NULL, NULL}
};
/* object table */
-static const luaL_reg M[] = {
+static const luaL_Reg M[] = {
{"close", nixio_sock_close},
{"shutdown", nixio_sock_shutdown},
{"__gc", nixio_sock__gc},
}
/* module table */
-static const luaL_reg M[] = {
+static const luaL_Reg M[] = {
{"setblocking", nixio_sock_setblocking},
{"getsockopt", nixio_sock_getsockopt},
{"setsockopt", nixio_sock_setsockopt},
}
/* module table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
#ifdef _GNU_SOURCE
#ifdef SPLICE_F_MOVE
{"splice", nixio_splice},
}
/* module table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
{"openlog", nixio_openlog},
{"syslog", nixio_syslog},
{"setlogmask", nixio_setlogmask},
}
/* module table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
{"tls", nixio_tls_ctx},
{NULL, NULL}
};
/* ctx function table */
-static const luaL_reg CTX_M[] = {
+static const luaL_Reg CTX_M[] = {
{"set_cert", nixio_tls_ctx_set_cert},
{"set_verify_locations", nixio_tls_ctx_set_verify_locations},
{"set_key", nixio_tls_ctx_set_key},
/* module table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
{"hash", nixio_crypto_hash},
{"hmac", nixio_crypto_hmac},
{NULL, NULL}
};
/* hash table */
-static const luaL_reg M[] = {
+static const luaL_Reg M[] = {
{"update", nixio_crypto_hash_update},
{"final", nixio_crypto_hash_final},
{"__gc", nixio_crypto_hash__gc},
/* ctx function table */
-static const luaL_reg M[] = {
+static const luaL_Reg M[] = {
{"recv", nixio_tls_sock_recv},
{"send", nixio_tls_sock_send},
{"read", nixio_tls_sock_recv},
/* module table */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
{"crypt", nixio_crypt},
{"getgr", nixio_getgr},
{"getpw", nixio_getpw},
#else /* __WINNT__ */
-static const luaL_reg R[] = {
+static const luaL_Reg R[] = {
{NULL, NULL}
};