diff options
Diffstat (limited to 'core/variant/callable.h')
| -rw-r--r-- | core/variant/callable.h | 10 | 
1 files changed, 7 insertions, 3 deletions
diff --git a/core/variant/callable.h b/core/variant/callable.h index 090fd888e2..20d0804292 100644 --- a/core/variant/callable.h +++ b/core/variant/callable.h @@ -44,9 +44,9 @@ class CallableCustom;  // is required. It is designed for the standard case (object and method)  // but can be optimized or customized. +// Enforce 16 bytes with `alignas` to avoid arch-specific alignment issues on x86 vs armv7.  class Callable { -	//needs to be max 16 bytes in 64 bits -	StringName method; +	alignas(8) StringName method;  	union {  		uint64_t object = 0;  		CallableCustom *custom; @@ -70,6 +70,8 @@ public:  	void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, CallError &r_call_error) const;  	void call_deferred(const Variant **p_arguments, int p_argcount) const; +	void rpc(int p_id, const Variant **p_arguments, int p_argcount, CallError &r_call_error) const; +  	_FORCE_INLINE_ bool is_null() const {  		return method == StringName() && object == 0;  	} @@ -124,6 +126,7 @@ public:  	virtual CompareLessFunc get_compare_less_func() const = 0;  	virtual ObjectID get_object() const = 0; //must always be able to provide an object  	virtual void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const = 0; +	virtual void rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const;  	virtual const Callable *get_base_comparator() const;  	CallableCustom(); @@ -135,8 +138,9 @@ public:  // be put inside a Variant, but it is not  // used by the engine itself. +// Enforce 16 bytes with `alignas` to avoid arch-specific alignment issues on x86 vs armv7.  class Signal { -	StringName name; +	alignas(8) StringName name;  	ObjectID object;  public:  |