aboutsummaryrefslogtreecommitdiff
path: root/loadlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-01-13 14:09:05 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-01-13 14:09:05 -0200
commit900b7d4514a29e9214f15213a81e2ee00bd482c3 (patch)
tree45ab750bf77fc215381fff400e464bbb4c83c7fe /loadlib.c
parent91f0b20a0e1e34e242bc401c0994175e3f0cacc2 (diff)
downloadlua-900b7d4514a29e9214f15213a81e2ee00bd482c3.tar.gz
lua-900b7d4514a29e9214f15213a81e2ee00bd482c3.tar.bz2
lua-900b7d4514a29e9214f15213a81e2ee00bd482c3.zip
on 64-bit machines, an address may not fit into a 'long', so it
is better to convert from pointer to void to pointer to function directly, even if ANSI C does not like it.
Diffstat (limited to 'loadlib.c')
-rw-r--r--loadlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/loadlib.c b/loadlib.c
index 74198fd9..d6b52a6c 100644
--- a/loadlib.c
+++ b/loadlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: loadlib.c,v 1.77 2010/01/11 17:34:59 roberto Exp roberto $ 2** $Id: loadlib.c,v 1.78 2010/01/11 17:55:25 roberto Exp roberto $
3** Dynamic library loader for Lua 3** Dynamic library loader for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5** 5**
@@ -113,7 +113,7 @@ static void *ll_load (lua_State *L, const char *path, int seeglb) {
113 113
114 114
115static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) { 115static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) {
116 lua_CFunction f = (lua_CFunction)(unsigned long)dlsym(lib, sym); 116 lua_CFunction f = (lua_CFunction)dlsym(lib, sym);
117 if (f == NULL) lua_pushstring(L, dlerror()); 117 if (f == NULL) lua_pushstring(L, dlerror());
118 return f; 118 return f;
119} 119}