From 24ed2644463f26eb84ac6d96d8305c8766e96acb Mon Sep 17 00:00:00 2001 From: william Date: Wed, 26 Mar 2014 19:59:50 -0700 Subject: alter several :add methods to return the parent object rather than boolean true, to allow chained invocations --- src/openssl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openssl.c b/src/openssl.c index 15749c9..0a6c996 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -1299,7 +1299,7 @@ static int xn_add(lua_State *L) { if (!ok) return throwssl(L, "x509.name:add"); - lua_pushboolean(L, 1); + lua_pushvalue(L, 1); return 1; } /* xn_add() */ @@ -1579,7 +1579,7 @@ text: sk_GENERAL_NAME_push(gens, gen); - lua_pushboolean(L, 1); + lua_pushvalue(L, 1); return 1; error: @@ -2877,7 +2877,7 @@ static int xl_add(lua_State *L) { return throwssl(L, "x509.chain:add"); } - lua_pushboolean(L, 1); + lua_pushvalue(L, 1); return 1; } /* xl_add() */ @@ -3012,7 +3012,7 @@ static int xs_add(lua_State *L) { } } - lua_pushboolean(L, 1); + lua_pushvalue(L, 1); return 1; } /* xs_add() */ -- cgit v1.2.3-59-g8ed1b