summaryrefslogtreecommitdiff
path: root/source/ap/vim/patches/7.3.494
blob: 81bd24b7d32c8dbfd9ae9f0bf3fc6ad779320da3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
To: vim_dev@googlegroups.com
Subject: Patch 7.3.494
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.494 (after 7.3.491)
Problem:    Can't compile with Lua 9.1 or dynamic Lua.
Solution:   Fix dll_ methods. Fix luado(). (Muraoka Taro, Luis Carvalho)
Files:	    src/if_lua.c


*** ../vim-7.3.493/src/if_lua.c	2012-04-05 16:53:56.000000000 +0200
--- src/if_lua.c	2012-04-06 14:24:06.000000000 +0200
***************
*** 95,100 ****
--- 95,101 ----
  #define luaL_loadbufferx dll_luaL_loadbufferx
  #define luaL_argerror dll_luaL_argerror
  #endif
+ #define luaL_checkany dll_luaL_checkany
  #define luaL_checklstring dll_luaL_checklstring
  #define luaL_checkinteger dll_luaL_checkinteger
  #define luaL_optinteger dll_luaL_optinteger
***************
*** 117,124 ****
  #define lua_pcallk dll_lua_pcallk
  #define lua_getglobal dll_lua_getglobal
  #define lua_setglobal dll_lua_setglobal
- #define lua_typename dll_lua_typename
  #endif
  #define lua_close dll_lua_close
  #define lua_gettop dll_lua_gettop
  #define lua_settop dll_lua_settop
--- 118,125 ----
  #define lua_pcallk dll_lua_pcallk
  #define lua_getglobal dll_lua_getglobal
  #define lua_setglobal dll_lua_setglobal
  #endif
+ #define lua_typename dll_lua_typename
  #define lua_close dll_lua_close
  #define lua_gettop dll_lua_gettop
  #define lua_settop dll_lua_settop
***************
*** 151,156 ****
--- 152,158 ----
  #define lua_rawset dll_lua_rawset
  #define lua_rawseti dll_lua_rawseti
  #define lua_setmetatable dll_lua_setmetatable
+ #define lua_next dll_lua_next
  /* libs */
  #define luaopen_base dll_luaopen_base
  #define luaopen_table dll_luaopen_table
***************
*** 177,182 ****
--- 179,185 ----
  int (*dll_luaL_loadbufferx) (lua_State *L, const char *buff, size_t sz, const char *name, const char *mode);
  int (*dll_luaL_argerror) (lua_State *L, int numarg, const char *extramsg);
  #endif
+ void (*dll_luaL_checkany) (lua_State *L, int narg);
  const char *(*dll_luaL_checklstring) (lua_State *L, int numArg, size_t *l);
  lua_Integer (*dll_luaL_checkinteger) (lua_State *L, int numArg);
  lua_Integer (*dll_luaL_optinteger) (lua_State *L, int nArg, lua_Integer def);
***************
*** 201,208 ****
          int ctx, lua_CFunction k);
  void (*dll_lua_getglobal) (lua_State *L, const char *var);
  void (*dll_lua_setglobal) (lua_State *L, const char *var);
- const char *(*dll_lua_typename) (lua_State *L, int tp);
  #endif
  void       (*dll_lua_close) (lua_State *L);
  int (*dll_lua_gettop) (lua_State *L);
  void (*dll_lua_settop) (lua_State *L, int idx);
--- 204,211 ----
          int ctx, lua_CFunction k);
  void (*dll_lua_getglobal) (lua_State *L, const char *var);
  void (*dll_lua_setglobal) (lua_State *L, const char *var);
  #endif
+ const char *(*dll_lua_typename) (lua_State *L, int tp);
  void       (*dll_lua_close) (lua_State *L);
  int (*dll_lua_gettop) (lua_State *L);
  void (*dll_lua_settop) (lua_State *L, int idx);
***************
*** 235,240 ****
--- 238,244 ----
  void (*dll_lua_rawset) (lua_State *L, int idx);
  void (*dll_lua_rawseti) (lua_State *L, int idx, int n);
  int (*dll_lua_setmetatable) (lua_State *L, int objindex);
+ int (*dll_lua_next) (lua_State *L, int idx);
  /* libs */
  int (*dll_luaopen_base) (lua_State *L);
  int (*dll_luaopen_table) (lua_State *L);
***************
*** 268,273 ****
--- 272,278 ----
      {"luaL_loadbufferx", (luaV_function) &dll_luaL_loadbufferx},
      {"luaL_argerror", (luaV_function) &dll_luaL_argerror},
  #endif
+     {"luaL_checkany", (luaV_function) &dll_luaL_checkany},
      {"luaL_checklstring", (luaV_function) &dll_luaL_checklstring},
      {"luaL_checkinteger", (luaV_function) &dll_luaL_checkinteger},
      {"luaL_optinteger", (luaV_function) &dll_luaL_optinteger},
***************
*** 290,297 ****
      {"lua_pcallk", (luaV_function) &dll_lua_pcallk},
      {"lua_getglobal", (luaV_function) &dll_lua_getglobal},
      {"lua_setglobal", (luaV_function) &dll_lua_setglobal},
-     {"lua_typename", (luaV_function) &dll_lua_typename},
  #endif
      {"lua_close", (luaV_function) &dll_lua_close},
      {"lua_gettop", (luaV_function) &dll_lua_gettop},
      {"lua_settop", (luaV_function) &dll_lua_settop},
--- 295,302 ----
      {"lua_pcallk", (luaV_function) &dll_lua_pcallk},
      {"lua_getglobal", (luaV_function) &dll_lua_getglobal},
      {"lua_setglobal", (luaV_function) &dll_lua_setglobal},
  #endif
+     {"lua_typename", (luaV_function) &dll_lua_typename},
      {"lua_close", (luaV_function) &dll_lua_close},
      {"lua_gettop", (luaV_function) &dll_lua_gettop},
      {"lua_settop", (luaV_function) &dll_lua_settop},
***************
*** 324,329 ****
--- 329,335 ----
      {"lua_rawset", (luaV_function) &dll_lua_rawset},
      {"lua_rawseti", (luaV_function) &dll_lua_rawseti},
      {"lua_setmetatable", (luaV_function) &dll_lua_setmetatable},
+     {"lua_next", (luaV_function) &dll_lua_next},
      /* libs */
      {"luaopen_base", (luaV_function) &dll_luaopen_base},
      {"luaopen_table", (luaV_function) &dll_luaopen_table},
***************
*** 1828,1834 ****
      }
      luaV_setrange(L, eap->line1, eap->line2);
      luaL_buffinit(L, &b);
!     luaL_addlstring(&b, "return function(line) ", 22); /* header */
      luaL_addlstring(&b, s, strlen(s));
      luaL_addlstring(&b, " end", 4); /* footer */
      luaL_pushresult(&b);
--- 1834,1840 ----
      }
      luaV_setrange(L, eap->line1, eap->line2);
      luaL_buffinit(L, &b);
!     luaL_addlstring(&b, "return function(line, linenr) ", 30); /* header */
      luaL_addlstring(&b, s, strlen(s));
      luaL_addlstring(&b, " end", 4); /* footer */
      luaL_pushresult(&b);
***************
*** 1845,1851 ****
      {
  	lua_pushvalue(L, -1); /* function */
  	luaV_pushline(L, curbuf, l); /* current line as arg */
! 	if (lua_pcall(L, 1, 1, 0))
  	{
  	    luaV_emsg(L);
  	    break;
--- 1851,1858 ----
      {
  	lua_pushvalue(L, -1); /* function */
  	luaV_pushline(L, curbuf, l); /* current line as arg */
! 	lua_pushinteger(L, l); /* current line number as arg */
! 	if (lua_pcall(L, 2, 1, 0))
  	{
  	    luaV_emsg(L);
  	    break;
*** ../vim-7.3.493/src/version.c	2012-04-06 13:56:00.000000000 +0200
--- src/version.c	2012-04-06 14:25:11.000000000 +0200
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     494,
  /**/

-- 
Why doesn't Tarzan have a beard?

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///