mirror of
https://github.com/nmap/nmap.git
synced 2025-12-28 02:19:04 +00:00
Add a tostring metamethod for bignum objects. See #1876
This commit is contained in:
@@ -650,6 +650,9 @@ LUALIB_API int luaopen_openssl(lua_State *L) {
|
||||
// metatable.__index = metatable
|
||||
lua_pushvalue( L, -1 );
|
||||
lua_setfield( L, -2, "__index" );
|
||||
// metatable.__tostring = bignum_bn2hex
|
||||
lua_pushcfunction( L, l_bignum_bn2hex );
|
||||
lua_setfield( L, -2, "__tostring" );
|
||||
// register methods
|
||||
luaL_setfuncs(L, bignum_methods, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user