MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / callp

Method callp

modules/gdscript/gdscript.cpp:115–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115Variant GDScriptNativeClass::callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
116 if (p_method == SNAME("new")) {
117 // Constructor.
118 return Object::callp(p_method, p_args, p_argcount, r_error);
119 }
120 MethodBind *method = ClassDB::get_method(name, p_method);
121 if (method && method->is_static()) {
122 // Native static method.
123 return method->call(nullptr, p_args, p_argcount, r_error);
124 }
125
126 r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
127 return Variant();
128}
129
130GDScriptFunction *GDScript::_super_constructor(GDScript *p_script) {
131 if (likely(p_script->valid) && p_script->initializer) {

Callers 15

emit_callbackMethod · 0.45
_report_eventMethod · 0.45
call_queriesMethod · 0.45
call_queriesMethod · 0.45
call_queriesMethod · 0.45
emit_callbackMethod · 0.45
OPCODEFunction · 0.45
callMethod · 0.45
_getMethod · 0.45
getMethod · 0.45

Calls 7

callpFunction · 0.85
VariantClass · 0.50
StringClass · 0.50
is_staticMethod · 0.45
callMethod · 0.45
findMethod · 0.45
ptrMethod · 0.45

Tested by 1

execute_test_codeMethod · 0.36