MCPcopy Create free account
hub / github.com/GNOME/gjs / get_name

Method get_name

gi/function.cpp:1221–1228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1219}
1220
1221bool Function::get_name(JSContext* cx, unsigned argc, JS::Value* vp) {
1222 GJS_CHECK_WRAPPER_PRIV(cx, argc, vp, rec, this_obj, Function, priv);
1223
1224 if (auto func_info = priv->m_info.as<GI::InfoTag::FUNCTION>())
1225 return gjs_string_from_utf8(cx, func_info->symbol(), rec.rval());
1226
1227 return gjs_string_from_utf8(cx, priv->format_name().c_str(), rec.rval());
1228}
1229
1230bool Function::to_string(JSContext* cx, unsigned argc, JS::Value* vp) {
1231 GJS_CHECK_WRAPPER_PRIV(cx, argc, vp, rec, this_obj, Function, priv);

Callers

nothing calls this directly

Calls 3

gjs_string_from_utf8Function · 0.85
symbolMethod · 0.80
format_nameMethod · 0.45

Tested by

no test coverage detected