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
|
diff -aur old/src/luamm.cc new/src/luamm.cc
--- old/src/luamm.cc 2015-06-28 16:38:47.793615922 -1000
+++ new/src/luamm.cc 2015-06-29 09:05:44.646667638 -1000
@@ -165,7 +165,14 @@
}
template<void (*misc)(lua_State *, int), int nresults>
- int safe_misc_trampoline(lua_State *l)
+ int safe_misc_trampoline_set(lua_State *l)
+ {
+ misc(l, 1);
+ return nresults;
+ }
+
+ template<int (*misc)(lua_State *, int), int nresults>
+ int safe_misc_trampoline_get(lua_State *l)
{
misc(l, 1);
return nresults;
@@ -326,7 +333,7 @@
if( rawequal(index1, index2) )
return true;
- return safe_compare(&safe_compare_trampoline<lua_equal>, index1, index2);
+ return safe_compare(&safe_compare_trampoline<&lua_equal>, index1, index2);
}
int state::gc(int what, int data)
@@ -367,7 +374,7 @@
checkstack(2);
pushvalue(index);
insert(-2);
- lua_pushcfunction(cobj.get(), (&safe_misc_trampoline<&lua_gettable, 1>));
+ lua_pushcfunction(cobj.get(), (&safe_misc_trampoline_get<&lua_gettable, 1>));
insert(-3);
call(2, 1, 0);
}
@@ -492,7 +499,7 @@
checkstack(2);
pushvalue(index);
insert(-3);
- lua_pushcfunction(cobj.get(), (&safe_misc_trampoline<&lua_settable, 0>));
+ lua_pushcfunction(cobj.get(), (&safe_misc_trampoline_set<&lua_settable, 0>));
insert(-4);
call(3, 0, 0);
}
|