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

Method callv

core/object/object.cpp:807–823  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

805}
806
807Variant Object::callv(const StringName &p_method, const Array &p_args) {
808 const Variant **argptrs = nullptr;
809
810 if (p_args.size() > 0) {
811 argptrs = (const Variant **)alloca(sizeof(Variant *) * p_args.size());
812 for (int i = 0; i < p_args.size(); i++) {
813 argptrs[i] = &p_args[i];
814 }
815 }
816
817 Callable::CallError ce;
818 const Variant ret = callp(p_method, argptrs, p_args.size(), ce);
819 if (ce.error != Callable::CallError::CALL_OK) {
820 ERR_FAIL_V_MSG(Variant(), vformat("Error calling method from 'callv': %s.", Variant::get_call_error_text(this, p_method, argptrs, p_args.size(), ce)));
821 }
822 return ret;
823}
824
825Variant Object::callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
826 r_error.error = Callable::CallError::CALL_OK;

Callers 5

process_actionMethod · 0.45
process_messageMethod · 0.45
_updateMethod · 0.45
test_object.hFile · 0.45

Calls 4

callpFunction · 0.85
vformatFunction · 0.85
sizeMethod · 0.65
VariantClass · 0.50

Tested by

no test coverage detected