aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lfs.c4
-rw-r--r--src/lfs.def3
-rw-r--r--src/lfs.h7
3 files changed, 10 insertions, 4 deletions
diff --git a/src/lfs.c b/src/lfs.c
index 4cb5875..020267d 100644
--- a/src/lfs.c
+++ b/src/lfs.c
@@ -292,7 +292,7 @@ static int lfs_lock_dir(lua_State *L) {
292 return 1; 292 return 1;
293} 293}
294static int lfs_unlock_dir(lua_State *L) { 294static 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}
327static int lfs_unlock_dir(lua_State *L) { 327static 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 @@
1LIBRARY lfs.dll 1LIBRARY lfs.dll
2DESCRIPTION "LuaFileSystem" 2VERSION 1.6
3VERSION 1.5.0
4EXPORTS 3EXPORTS
5luaopen_lfs 4luaopen_lfs
diff --git a/src/lfs.h b/src/lfs.h
index ddd454d..02ceafb 100644
--- a/src/lfs.h
+++ b/src/lfs.h
@@ -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
25extern "C" {
26#endif
24 27
25int luaopen_lfs (lua_State *L); 28int luaopen_lfs (lua_State *L);
29
30#ifdef __cplusplus
31}
32#endif