mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Add a tostring metamethod for bignum objects. See #1876
This commit is contained in:
parent
0f3a8a7e0d
commit
f8846c2c39
1 changed files with 3 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue