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

Function gjs_define_enum_values

gi/enumeration.cpp:64–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64bool gjs_define_enum_values(JSContext* cx, JS::HandleObject in_object,
65 const GI::EnumInfo& info) {
66 /* Fill in enum values first, so we don't define the enum itself until we're
67 * sure we can finish successfully.
68 */
69 auto iter = info.values();
70 return std::all_of(iter.begin(), iter.end(),
71 [cx, in_object](const GI::AutoValueInfo& value_info) {
72 return gjs_define_enum_value(cx, in_object,
73 value_info);
74 });
75}
76
77bool gjs_define_enumeration(JSContext* cx, JS::HandleObject in_object,
78 const GI::EnumInfo& info) {

Callers 2

define_classMethod · 0.85
gjs_define_enumerationFunction · 0.85

Calls 4

gjs_define_enum_valueFunction · 0.85
valuesMethod · 0.80
beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected