From 9ddebc0c22866d6b7a7ff3fa64b67cc86c8664da Mon Sep 17 00:00:00 2001 From: "K. S. Ernest (iFire) Lee" Date: Mon, 27 Jun 2022 13:10:04 -0700 Subject: Add a const call mode to Object, Variant and Script. For this to work safely (user not call queue_free or something in the expression), a const call mode was added to Object and Variant (and optionally Script). This mode ensures only const functions can be called, making it safe to use from the editor. Co-Authored-By: reduz --- core/extension/gdnative_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/extension') diff --git a/core/extension/gdnative_interface.h b/core/extension/gdnative_interface.h index 095c7983ee..ccd6fb0f7e 100644 --- a/core/extension/gdnative_interface.h +++ b/core/extension/gdnative_interface.h @@ -153,7 +153,7 @@ typedef enum { GDNATIVE_CALL_ERROR_TOO_MANY_ARGUMENTS, /* expected is number of arguments */ GDNATIVE_CALL_ERROR_TOO_FEW_ARGUMENTS, /* expected is number of arguments */ GDNATIVE_CALL_ERROR_INSTANCE_IS_NULL, - + GDNATIVE_CALL_ERROR_METHOD_NOT_CONST, /* used for const call */ } GDNativeCallErrorType; typedef struct { -- cgit v1.2.3