| 243 | |
| 244 | |
| 245 | static int comp_custom (lua_State *L, const TValue *a, const TValue *b) { |
| 246 | int res; |
| 247 | lua_pushvalue(L, 2); /* comparison function, see sort() */ |
| 248 | lua_lock(L); |
| 249 | setobj2s(L, L->top, a); L->top++; |
| 250 | setobj2s(L, L->top, b); L->top++; |
| 251 | lua_unlock(L); |
| 252 | lua_call(L, 2, 1); |
| 253 | res = lua_toboolean(L, -1); |
| 254 | lua_pop(L, 1); |
| 255 | return res; |
| 256 | } |
| 257 | |
| 258 | |
| 259 | static void mergesort (SortInfo *sortInfo, TValue* data, int size) { |
nothing calls this directly
no test coverage detected