Created
March 21, 2015 02:57
-
-
Save elieux/5e5fa517cb9f2d0dccc1 to your computer and use it in GitHub Desktop.
SciTE patches for Lua 5.1.4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Naurwp dist/lauxlib.c scite/lauxlib.c | |
--- dist/lauxlib.c 2015-03-21 03:38:03.865288100 +0100 | |
+++ scite/lauxlib.c 2013-01-17 02:17:02.000000000 +0100 | |
@@ -646,7 +646,7 @@ static int panic (lua_State *L) { | |
LUALIB_API lua_State *luaL_newstate (void) { | |
lua_State *L = lua_newstate(l_alloc, NULL); | |
- if (L) lua_atpanic(L, &panic); | |
+ if (L) lua_atpanic(L, panic); | |
return L; | |
} | |
diff -Naurwp dist/loadlib.c scite/loadlib.c | |
--- dist/loadlib.c 2015-03-21 03:38:04.016280700 +0100 | |
+++ scite/loadlib.c 2013-01-17 02:17:02.000000000 +0100 | |
@@ -21,6 +21,9 @@ | |
#include "lauxlib.h" | |
#include "lualib.h" | |
+#ifndef _WIN32 | |
+#define LUA_DL_DLOPEN | |
+#endif | |
/* prefix for open functions in C libraries */ | |
#define LUA_POF "luaopen_" | |
@@ -73,7 +76,7 @@ static void *ll_load (lua_State *L, cons | |
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)(long)dlsym(lib, sym); | |
if (f == NULL) lua_pushstring(L, dlerror()); | |
return f; | |
} | |
diff -Naurwp dist/loslib.c scite/loslib.c | |
--- dist/loslib.c 2015-03-21 03:38:04.030302700 +0100 | |
+++ scite/loslib.c 2013-01-17 02:17:02.000000000 +0100 | |
@@ -215,6 +215,7 @@ static int os_setlocale (lua_State *L) { | |
static int os_exit (lua_State *L) { | |
exit(luaL_optint(L, 1, EXIT_SUCCESS)); | |
+ return 0; | |
} | |
static const luaL_Reg syslib[] = { | |
diff -Naurwp dist/lparser.c scite/lparser.c | |
--- dist/lparser.c 2015-03-21 03:38:04.039304800 +0100 | |
+++ scite/lparser.c 2013-01-17 02:17:02.000000000 +0100 | |
@@ -838,7 +838,7 @@ static BinOpr subexpr (LexState *ls, exp | |
else simpleexp(ls, v); | |
/* expand while operators have priorities higher than `limit' */ | |
op = getbinopr(ls->t.token); | |
- while (op != OPR_NOBINOPR && priority[op].left > limit) { | |
+ while (op != OPR_NOBINOPR && priority[op].left > (int)limit) { | |
expdesc v2; | |
BinOpr nextop; | |
luaX_next(ls); | |
diff -Naurwp dist/luaconf.h scite/luaconf.h | |
--- dist/luaconf.h 2015-03-21 03:38:04.170290300 +0100 | |
+++ scite/luaconf.h 2013-01-17 02:17:02.000000000 +0100 | |
@@ -161,7 +161,11 @@ | |
#else | |
+#if defined(_WIN32) | |
+#define LUA_API __declspec(dllexport) | |
+#else | |
#define LUA_API extern | |
+#endif | |
#endif | |
@@ -757,6 +761,10 @@ union luai_Cast { double l_d; long l_l; | |
** without modifying the main part of the file. | |
*/ | |
+#ifdef _MSC_VER | |
+/* Uninteresting 64-bit warnings with twoto */ | |
+#pragma warning(disable: 4334) | |
+#endif | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment