From d320c908d0e0cb1daa0d6960190659fa929b7ae0 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 11 Jan 2010 15:34:59 -0200 Subject: 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"). --- loadlib.c | 4 ++-- 1 file 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 @@ /* -** $Id: loadlib.c,v 1.75 2010/01/11 17:06:31 roberto Exp roberto $ +** $Id: loadlib.c,v 1.76 2010/01/11 17:11:24 roberto Exp roberto $ ** Dynamic library loader for Lua ** See Copyright Notice in lua.h ** @@ -113,7 +113,7 @@ static void *ll_load (lua_State *L, const char *path, int seeglb) { static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) { - lua_CFunction f = (lua_CFunction)dlsym(lib, sym); + lua_CFunction f = (lua_CFunction)(unsigned long)dlsym(lib, sym); if (f == NULL) lua_pushstring(L, dlerror()); return f; } -- cgit v1.2.3-55-g6feb