aboutsummaryrefslogtreecommitdiff
path: root/loadlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-01-11 15:34:59 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-01-11 15:34:59 -0200
commitd320c908d0e0cb1daa0d6960190659fa929b7ae0 (patch)
tree427fb448cabeb6bdacb5e6b3d3562fe28d1355a8 /loadlib.c
parent8bfc696676f5ae6dc669b142981bc4ec8b3c4fb2 (diff)
downloadlua-d320c908d0e0cb1daa0d6960190659fa929b7ae0.tar.gz
lua-d320c908d0e0cb1daa0d6960190659fa929b7ae0.tar.bz2
lua-d320c908d0e0cb1daa0d6960190659fa929b7ae0.zip
conversion from pointer to void to pointer to function seems more
"correct" if done through an integral type (because conversions between pointers and numbers are allowed, only "implementation defined").
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 f4a622d7..eb52ad5f 100644
--- a/loadlib.c
+++ b/loadlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: loadlib.c,v 1.75 2010/01/11 17:06:31 roberto Exp roberto $ 2** $Id: loadlib.c,v 1.76 2010/01/11 17:11:24 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)dlsym(lib, sym); 116 lua_CFunction f = (lua_CFunction)(unsigned long)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}