Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/torch7.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
authorLeon Bottou <leon@bottou.org>2013-04-11 23:31:09 +0400
committerLeon Bottou <leon@bottou.org>2013-08-11 00:21:46 +0400
commit962e1df4a7035141ee115e7d2543dc2db0f92fce (patch)
treea37688a0e1b77b2e3ccdf9f2c84bf245b40448f1 /init.c
parentc90103da149e9f048517e89d9c88bc949fb864d1 (diff)
luaopen_xxx functions need LUA_EXTERNC
Diffstat (limited to 'init.c')
-rw-r--r--init.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/init.c b/init.c
index fedbe0c..46ec2fd 100644
--- a/init.c
+++ b/init.c
@@ -46,7 +46,9 @@ static void luaTorchArgErrorHandlerFunction(int argNumber, const char *msg)
luaL_argcheck(globalL, 0, argNumber, msg);
}
-DLL_EXPORT int luaopen_libtorch(lua_State *L)
+LUA_EXTERNC DLL_EXPORT int luaopen_libtorch(lua_State *L);
+
+int luaopen_libtorch(lua_State *L)
{
globalL = L;
THSetErrorHandler(luaTorchErrorHandlerFunction);