Remove loading of libzmq.so/libzmq.dll for FFI bindings, since the symbols are accessible from zmq.so which we where loading.

zmq3.0
Robert G. Jakabosky 15 years ago
parent 26200cf9c0
commit 67993e7953

@ -1033,7 +1033,7 @@ static const char zmq_ffi_lua_code[] = "local ffi=require\"ffi\"\n"
" _pub[obj_name] = constructor\n" " _pub[obj_name] = constructor\n"
" end\n" " end\n"
"end\n" "end\n"
"local C = ffi_load_cmodule(\"zmq\", true)\n" "local C = ffi_load_cmodule(\"zmq\", false)\n"
"\n" "\n"
"ffi.cdef[[\n" "ffi.cdef[[\n"
"typedef int ZMQ_Error;\n" "typedef int ZMQ_Error;\n"
@ -1376,11 +1376,6 @@ static const char zmq_ffi_lua_code[] = "local ffi=require\"ffi\"\n"
"end\n" "end\n"
"\n" "\n"
"\n" "\n"
"local os_lib_table = {\n"
" [\"Windows\"] = \"libzmq\",\n"
"}\n"
"local C = ffi_load(os_lib_table[ffi.os] or \"zmq\", true)\n"
"\n"
"\n" "\n"
"-- Start \"ZErrors\" FFI interface\n" "-- Start \"ZErrors\" FFI interface\n"
"-- End \"ZErrors\" FFI interface\n" "-- End \"ZErrors\" FFI interface\n"
@ -1561,7 +1556,7 @@ static const char zmq_ffi_lua_code[] = "local ffi=require\"ffi\"\n"
"-- Start \"ZMQ_Socket\" FFI interface\n" "-- Start \"ZMQ_Socket\" FFI interface\n"
"-- method: close\n" "-- method: close\n"
"function _meth.ZMQ_Socket.close(self)\n" "function _meth.ZMQ_Socket.close(self)\n"
" local self, free,this_flags1=obj_type_ZMQ_Socket_delete(self)\n" " local self,this_flags1 = obj_type_ZMQ_Socket_delete(self)\n"
" if not self then return end\n" " if not self then return end\n"
" local rc_zmq_close1\n" " local rc_zmq_close1\n"
" rc_zmq_close1 = C.zmq_close(self)\n" " rc_zmq_close1 = C.zmq_close(self)\n"
@ -1978,7 +1973,7 @@ static const char zmq_ffi_lua_code[] = "local ffi=require\"ffi\"\n"
"-- Start \"ZMQ_Ctx\" FFI interface\n" "-- Start \"ZMQ_Ctx\" FFI interface\n"
"-- method: term\n" "-- method: term\n"
"function _meth.ZMQ_Ctx.term(self)\n" "function _meth.ZMQ_Ctx.term(self)\n"
" local self, free,this_flags1=obj_type_ZMQ_Ctx_delete(self)\n" " local self,this_flags1 = obj_type_ZMQ_Ctx_delete(self)\n"
" if not self then return end\n" " if not self then return end\n"
" local rc_zmq_term1\n" " local rc_zmq_term1\n"
" rc_zmq_term1 = C.zmq_term(self)\n" " rc_zmq_term1 = C.zmq_term(self)\n"
@ -2027,7 +2022,7 @@ static const char zmq_ffi_lua_code[] = "local ffi=require\"ffi\"\n"
"register_default_constructor(_pub,\"ZMQ_StopWatch\",_pub.ZMQ_StopWatch.start)\n" "register_default_constructor(_pub,\"ZMQ_StopWatch\",_pub.ZMQ_StopWatch.start)\n"
"-- method: stop\n" "-- method: stop\n"
"function _meth.ZMQ_StopWatch.stop(self)\n" "function _meth.ZMQ_StopWatch.stop(self)\n"
" local self, free,this_flags1=obj_type_ZMQ_StopWatch_delete(self)\n" " local self,this_flags1 = obj_type_ZMQ_StopWatch_delete(self)\n"
" if not self then return end\n" " if not self then return end\n"
" local usecs1\n" " local usecs1\n"
" usecs1 = C.zmq_stopwatch_stop(self)\n" " usecs1 = C.zmq_stopwatch_stop(self)\n"

@ -26,16 +26,11 @@ c_module "zmq" {
use_globals = false, use_globals = false,
hide_meta_info = true, hide_meta_info = true,
luajit_ffi = true, luajit_ffi = true,
luajit_ffi_load_cmodule = "global", luajit_ffi_load_cmodule = true,
sys_include "string.h", sys_include "string.h",
include "zmq.h", include "zmq.h",
ffi_load { global = true,
"zmq", -- default lib name.
Windows = "libzmq", -- lib name for on windows.
},
-- --
-- Module constants -- Module constants
-- --

Loading…
Cancel
Save