1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
10 Patch 7.3.494 (after 7.3.491)
11 Problem: Can't compile with Lua 9.1 or dynamic Lua.
12 Solution: Fix dll_ methods. Fix luado(). (Muraoka Taro, Luis Carvalho)
16 *** ../vim-7.3.493/src/if_lua.c 2012-04-05 16:53:56.000000000 +0200
17 --- src/if_lua.c 2012-04-06 14:24:06.000000000 +0200
21 #define luaL_loadbufferx dll_luaL_loadbufferx
22 #define luaL_argerror dll_luaL_argerror
24 + #define luaL_checkany dll_luaL_checkany
25 #define luaL_checklstring dll_luaL_checklstring
26 #define luaL_checkinteger dll_luaL_checkinteger
27 #define luaL_optinteger dll_luaL_optinteger
30 #define lua_pcallk dll_lua_pcallk
31 #define lua_getglobal dll_lua_getglobal
32 #define lua_setglobal dll_lua_setglobal
33 - #define lua_typename dll_lua_typename
35 #define lua_close dll_lua_close
36 #define lua_gettop dll_lua_gettop
37 #define lua_settop dll_lua_settop
39 #define lua_pcallk dll_lua_pcallk
40 #define lua_getglobal dll_lua_getglobal
41 #define lua_setglobal dll_lua_setglobal
43 + #define lua_typename dll_lua_typename
44 #define lua_close dll_lua_close
45 #define lua_gettop dll_lua_gettop
46 #define lua_settop dll_lua_settop
50 #define lua_rawset dll_lua_rawset
51 #define lua_rawseti dll_lua_rawseti
52 #define lua_setmetatable dll_lua_setmetatable
53 + #define lua_next dll_lua_next
55 #define luaopen_base dll_luaopen_base
56 #define luaopen_table dll_luaopen_table
60 int (*dll_luaL_loadbufferx) (lua_State *L, const char *buff, size_t sz, const char *name, const char *mode);
61 int (*dll_luaL_argerror) (lua_State *L, int numarg, const char *extramsg);
63 + void (*dll_luaL_checkany) (lua_State *L, int narg);
64 const char *(*dll_luaL_checklstring) (lua_State *L, int numArg, size_t *l);
65 lua_Integer (*dll_luaL_checkinteger) (lua_State *L, int numArg);
66 lua_Integer (*dll_luaL_optinteger) (lua_State *L, int nArg, lua_Integer def);
69 int ctx, lua_CFunction k);
70 void (*dll_lua_getglobal) (lua_State *L, const char *var);
71 void (*dll_lua_setglobal) (lua_State *L, const char *var);
72 - const char *(*dll_lua_typename) (lua_State *L, int tp);
74 void (*dll_lua_close) (lua_State *L);
75 int (*dll_lua_gettop) (lua_State *L);
76 void (*dll_lua_settop) (lua_State *L, int idx);
78 int ctx, lua_CFunction k);
79 void (*dll_lua_getglobal) (lua_State *L, const char *var);
80 void (*dll_lua_setglobal) (lua_State *L, const char *var);
82 + const char *(*dll_lua_typename) (lua_State *L, int tp);
83 void (*dll_lua_close) (lua_State *L);
84 int (*dll_lua_gettop) (lua_State *L);
85 void (*dll_lua_settop) (lua_State *L, int idx);
89 void (*dll_lua_rawset) (lua_State *L, int idx);
90 void (*dll_lua_rawseti) (lua_State *L, int idx, int n);
91 int (*dll_lua_setmetatable) (lua_State *L, int objindex);
92 + int (*dll_lua_next) (lua_State *L, int idx);
94 int (*dll_luaopen_base) (lua_State *L);
95 int (*dll_luaopen_table) (lua_State *L);
99 {"luaL_loadbufferx", (luaV_function) &dll_luaL_loadbufferx},
100 {"luaL_argerror", (luaV_function) &dll_luaL_argerror},
102 + {"luaL_checkany", (luaV_function) &dll_luaL_checkany},
103 {"luaL_checklstring", (luaV_function) &dll_luaL_checklstring},
104 {"luaL_checkinteger", (luaV_function) &dll_luaL_checkinteger},
105 {"luaL_optinteger", (luaV_function) &dll_luaL_optinteger},
108 {"lua_pcallk", (luaV_function) &dll_lua_pcallk},
109 {"lua_getglobal", (luaV_function) &dll_lua_getglobal},
110 {"lua_setglobal", (luaV_function) &dll_lua_setglobal},
111 - {"lua_typename", (luaV_function) &dll_lua_typename},
113 {"lua_close", (luaV_function) &dll_lua_close},
114 {"lua_gettop", (luaV_function) &dll_lua_gettop},
115 {"lua_settop", (luaV_function) &dll_lua_settop},
117 {"lua_pcallk", (luaV_function) &dll_lua_pcallk},
118 {"lua_getglobal", (luaV_function) &dll_lua_getglobal},
119 {"lua_setglobal", (luaV_function) &dll_lua_setglobal},
121 + {"lua_typename", (luaV_function) &dll_lua_typename},
122 {"lua_close", (luaV_function) &dll_lua_close},
123 {"lua_gettop", (luaV_function) &dll_lua_gettop},
124 {"lua_settop", (luaV_function) &dll_lua_settop},
128 {"lua_rawset", (luaV_function) &dll_lua_rawset},
129 {"lua_rawseti", (luaV_function) &dll_lua_rawseti},
130 {"lua_setmetatable", (luaV_function) &dll_lua_setmetatable},
131 + {"lua_next", (luaV_function) &dll_lua_next},
133 {"luaopen_base", (luaV_function) &dll_luaopen_base},
134 {"luaopen_table", (luaV_function) &dll_luaopen_table},
138 luaV_setrange(L, eap->line1, eap->line2);
139 luaL_buffinit(L, &b);
140 ! luaL_addlstring(&b, "return function(line) ", 22); /* header */
141 luaL_addlstring(&b, s, strlen(s));
142 luaL_addlstring(&b, " end", 4); /* footer */
146 luaV_setrange(L, eap->line1, eap->line2);
147 luaL_buffinit(L, &b);
148 ! luaL_addlstring(&b, "return function(line, linenr) ", 30); /* header */
149 luaL_addlstring(&b, s, strlen(s));
150 luaL_addlstring(&b, " end", 4); /* footer */
155 lua_pushvalue(L, -1); /* function */
156 luaV_pushline(L, curbuf, l); /* current line as arg */
157 ! if (lua_pcall(L, 1, 1, 0))
163 lua_pushvalue(L, -1); /* function */
164 luaV_pushline(L, curbuf, l); /* current line as arg */
165 ! lua_pushinteger(L, l); /* current line number as arg */
166 ! if (lua_pcall(L, 2, 1, 0))
170 *** ../vim-7.3.493/src/version.c 2012-04-06 13:56:00.000000000 +0200
171 --- src/version.c 2012-04-06 14:25:11.000000000 +0200
175 { /* Add new patch number below this line */
181 Why doesn't Tarzan have a beard?
183 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
184 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
185 \\\ an exciting new programming language -- http://www.Zimbu.org ///
186 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///