Comparison

util-src/strbitop.c @ 11175:235537247aa3 0.11

Back out changeset 2c1583bb0e0f Same reason as 712b2e6a09d9
author Kim Alvefur <zash@zash.se>
date Thu, 15 Oct 2020 17:21:58 +0200
parent 11172:712b2e6a09d9
child 12469:2b3adaa6d38e
comparison
equal deleted inserted replaced
11172:712b2e6a09d9 11175:235537247aa3
18 luaL_Buffer buf; 18 luaL_Buffer buf;
19 size_t a, b, i; 19 size_t a, b, i;
20 const char *str_a = luaL_checklstring(L, 1, &a); 20 const char *str_a = luaL_checklstring(L, 1, &a);
21 const char *str_b = luaL_checklstring(L, 2, &b); 21 const char *str_b = luaL_checklstring(L, 2, &b);
22 22
23 luaL_buffinit(L, &buf);
24
23 if(a == 0 || b == 0) { 25 if(a == 0 || b == 0) {
24 lua_settop(L, 1); 26 lua_settop(L, 1);
25 return 1; 27 return 1;
26 } 28 }
27 29
36 int strop_or(lua_State *L) { 38 int strop_or(lua_State *L) {
37 luaL_Buffer buf; 39 luaL_Buffer buf;
38 size_t a, b, i; 40 size_t a, b, i;
39 const char *str_a = luaL_checklstring(L, 1, &a); 41 const char *str_a = luaL_checklstring(L, 1, &a);
40 const char *str_b = luaL_checklstring(L, 2, &b); 42 const char *str_b = luaL_checklstring(L, 2, &b);
43
44 luaL_buffinit(L, &buf);
41 45
42 if(a == 0 || b == 0) { 46 if(a == 0 || b == 0) {
43 lua_settop(L, 1); 47 lua_settop(L, 1);
44 return 1; 48 return 1;
45 } 49 }