0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-02 21:59:02 +02:00

ircd::js: Function to get JSFunction arity.

This commit is contained in:
Jason Volk 2016-10-26 07:49:14 -07:00
parent 1dcbfb5c33
commit fcc9cdee74

View file

@ -28,6 +28,7 @@ namespace js {
string decompile(const JS::Handle<JSFunction *> &, const bool &pretty = false);
string display_name(const JSFunction &);
string name(const JSFunction &);
uint16_t arity(const JSFunction &f);
struct function
:JS::Rooted<JSFunction *>
@ -132,6 +133,12 @@ const
return ret;
}
inline uint16_t
arity(const JSFunction &f)
{
return JS_GetFunctionArity(const_cast<JSFunction *>(&f));
}
inline string
name(const JSFunction &f)
{