Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/editors/fxite/files/patch-src_luafuncs.cpp
16461 views
1
--- src/luafuncs.cpp.orig 2013-10-03 09:22:51 UTC
2
+++ src/luafuncs.cpp
3
@@ -25,8 +25,8 @@
4
#include <FX88591Codec.h>
5
#include <FXUTF16Codec.h>
6
7
-#include "macro.h"
8
#include "compat.h"
9
+#include "macro.h"
10
#include "appwin_pub.h"
11
#include "scidoc.h"
12
#include "doctabs.h"
13
@@ -38,6 +38,9 @@
14
#include "intl.h"
15
#include "luafuncs.h"
16
17
+#if LUA_VERSION_NUM<502
18
+# define lua_rawlen lua_objlen
19
+#endif
20
21
22
/*
23
@@ -86,7 +89,7 @@ static bool check_find_flags(lua_State* L, int pos, in
24
{
25
flags=0;
26
luaL_argcheck(L, lua_istable(L,pos), pos, _("expected table"));
27
- int n=lua_objlen(L, pos);
28
+ int n=lua_rawlen(L, pos);
29
for (int i=1; i<=n; i++) {
30
lua_rawgeti(L, pos, i);
31
if (lua_isstring(L,-1)) {
32
@@ -287,7 +290,7 @@ static int select(lua_State* L)
33
sel_start=luaL_checkinteger(L,1);
34
sel_end=(1==argc)?sel_start:luaL_checkinteger(L,2);
35
sci->sendMessage(SCI_SETSELECTIONMODE, rectsel?SC_SEL_RECTANGLE:SC_SEL_STREAM, 0);
36
- sci->sendMessage(SCI_SETCURRENTPOS, sel_end, FALSE);
37
+ sci->sendMessage(SCI_SETCURRENTPOS, sel_end, false);
38
sci->sendMessage(SCI_SETANCHOR, sel_start, 0);
39
sci->ScrollCaret();
40
sci->sendMessage(SCI_SETSELECTIONMODE, rectsel?SC_SEL_RECTANGLE:SC_SEL_STREAM, 0);
41
@@ -1354,7 +1357,7 @@ static int tagfiles(lua_State* L)
42
43
44
45
-static const struct luaL_reg fxte_funcs[] = {
46
+static const struct luaL_Reg fxte_funcs[] = {
47
{"seltext", seltext},
48
{"text", text},
49
{"documents", documents},
50
@@ -1403,7 +1406,7 @@ static const struct luaL_reg fxte_funcs[] = {
51
52
53
54
-const luaL_reg* LuaFuncs()
55
+const luaL_Reg* LuaFuncs()
56
{
57
return fxte_funcs;
58
}
59
60