diff options
-rw-r--r-- | src/lfs.c | 4 | ||||
-rw-r--r-- | src/lfs.def | 3 | ||||
-rw-r--r-- | src/lfs.h | 7 |
3 files changed, 10 insertions, 4 deletions
@@ -292,7 +292,7 @@ static int lfs_lock_dir(lua_State *L) { | |||
292 | return 1; | 292 | return 1; |
293 | } | 293 | } |
294 | static int lfs_unlock_dir(lua_State *L) { | 294 | static int lfs_unlock_dir(lua_State *L) { |
295 | lfs_Lock *lock = luaL_checkudata(L, 1, LOCK_METATABLE); | 295 | lfs_Lock *lock = (lfs_Lock *)luaL_checkudata(L, 1, LOCK_METATABLE); |
296 | if(lock->fd != INVALID_HANDLE_VALUE) { | 296 | if(lock->fd != INVALID_HANDLE_VALUE) { |
297 | CloseHandle(lock->fd); | 297 | CloseHandle(lock->fd); |
298 | lock->fd=INVALID_HANDLE_VALUE; | 298 | lock->fd=INVALID_HANDLE_VALUE; |
@@ -325,7 +325,7 @@ static int lfs_lock_dir(lua_State *L) { | |||
325 | return 1; | 325 | return 1; |
326 | } | 326 | } |
327 | static int lfs_unlock_dir(lua_State *L) { | 327 | static int lfs_unlock_dir(lua_State *L) { |
328 | lfs_Lock *lock = luaL_checkudata(L, 1, LOCK_METATABLE); | 328 | lfs_Lock *lock = (lfs_Lock *)luaL_checkudata(L, 1, LOCK_METATABLE); |
329 | if(lock->ln) { | 329 | if(lock->ln) { |
330 | unlink(lock->ln); | 330 | unlink(lock->ln); |
331 | free(lock->ln); | 331 | free(lock->ln); |
diff --git a/src/lfs.def b/src/lfs.def index 7aa7a35..8a36d41 100644 --- a/src/lfs.def +++ b/src/lfs.def | |||
@@ -1,5 +1,4 @@ | |||
1 | LIBRARY lfs.dll | 1 | LIBRARY lfs.dll |
2 | DESCRIPTION "LuaFileSystem" | 2 | VERSION 1.6 |
3 | VERSION 1.5.0 | ||
4 | EXPORTS | 3 | EXPORTS |
5 | luaopen_lfs | 4 | luaopen_lfs |
@@ -21,5 +21,12 @@ | |||
21 | #define fileno(f) (_fileno(f)) | 21 | #define fileno(f) (_fileno(f)) |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | #ifdef __cplusplus | ||
25 | extern "C" { | ||
26 | #endif | ||
24 | 27 | ||
25 | int luaopen_lfs (lua_State *L); | 28 | int luaopen_lfs (lua_State *L); |
29 | |||
30 | #ifdef __cplusplus | ||
31 | } | ||
32 | #endif | ||