Compare commits
No commits in common. "f7674a16b654be9157b98ed66b2d0f418f4b93f5" and "575e8270acb100d23ed1b4dbc115bf7c9134dadf" have entirely different histories.
f7674a16b6
...
575e8270ac
|
@ -155,8 +155,8 @@ jobs:
|
||||||
uses: dsnopek/action-download-artifact@1322f74e2dac9feed2ee76a32d9ae1ca3b4cf4e9
|
uses: dsnopek/action-download-artifact@1322f74e2dac9feed2ee76a32d9ae1ca3b4cf4e9
|
||||||
if: ${{ matrix.run-tests }}
|
if: ${{ matrix.run-tests }}
|
||||||
with:
|
with:
|
||||||
repo: AThousandShips/godot
|
repo: godotengine/godot
|
||||||
branch: the_angry_count
|
branch: master
|
||||||
event: push
|
event: push
|
||||||
workflow: linux_builds.yml
|
workflow: linux_builds.yml
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
|
|
|
@ -393,37 +393,6 @@ typedef void (*GDExtensionCallableCustomToString)(void *callable_userdata, GDExt
|
||||||
|
|
||||||
typedef GDExtensionInt (*GDExtensionCallableCustomGetArgumentCount)(void *callable_userdata);
|
typedef GDExtensionInt (*GDExtensionCallableCustomGetArgumentCount)(void *callable_userdata);
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* Only `call_func` and `token` are strictly required, however, `object_id` should be passed if its not a static method.
|
|
||||||
*
|
|
||||||
* `token` should point to an address that uniquely identifies the GDExtension (for example, the
|
|
||||||
* `GDExtensionClassLibraryPtr` passed to the entry symbol function.
|
|
||||||
*
|
|
||||||
* `hash_func`, `equal_func`, and `less_than_func` are optional. If not provided both `call_func` and
|
|
||||||
* `callable_userdata` together are used as the identity of the callable for hashing and comparison purposes.
|
|
||||||
*
|
|
||||||
* The hash returned by `hash_func` is cached, `hash_func` will not be called more than once per callable.
|
|
||||||
*
|
|
||||||
* `is_valid_func` is necessary if the validity of the callable can change before destruction.
|
|
||||||
*
|
|
||||||
* `free_func` is necessary if `callable_userdata` needs to be cleaned up when the callable is freed.
|
|
||||||
*/
|
|
||||||
void *callable_userdata;
|
|
||||||
void *token;
|
|
||||||
|
|
||||||
GDObjectInstanceID object_id;
|
|
||||||
|
|
||||||
GDExtensionCallableCustomCall call_func;
|
|
||||||
GDExtensionCallableCustomIsValid is_valid_func;
|
|
||||||
GDExtensionCallableCustomFree free_func;
|
|
||||||
|
|
||||||
GDExtensionCallableCustomHash hash_func;
|
|
||||||
GDExtensionCallableCustomEqual equal_func;
|
|
||||||
GDExtensionCallableCustomLessThan less_than_func;
|
|
||||||
|
|
||||||
GDExtensionCallableCustomToString to_string_func;
|
|
||||||
} GDExtensionCallableCustomInfo; // Deprecated. Use GDExtensionCallableCustomInfo2 instead.
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* Only `call_func` and `token` are strictly required, however, `object_id` should be passed if its not a static method.
|
/* Only `call_func` and `token` are strictly required, however, `object_id` should be passed if its not a static method.
|
||||||
*
|
*
|
||||||
|
@ -455,7 +424,7 @@ typedef struct {
|
||||||
GDExtensionCallableCustomToString to_string_func;
|
GDExtensionCallableCustomToString to_string_func;
|
||||||
|
|
||||||
GDExtensionCallableCustomGetArgumentCount get_argument_count_func;
|
GDExtensionCallableCustomGetArgumentCount get_argument_count_func;
|
||||||
} GDExtensionCallableCustomInfo2;
|
} GDExtensionCallableCustomInfo;
|
||||||
|
|
||||||
/* SCRIPT INSTANCE EXTENSION */
|
/* SCRIPT INSTANCE EXTENSION */
|
||||||
|
|
||||||
|
@ -540,48 +509,7 @@ typedef struct {
|
||||||
|
|
||||||
GDExtensionScriptInstanceFree free_func;
|
GDExtensionScriptInstanceFree free_func;
|
||||||
|
|
||||||
} GDExtensionScriptInstanceInfo; // Deprecated. Use GDExtensionScriptInstanceInfo3 instead.
|
} GDExtensionScriptInstanceInfo; // Deprecated. Use GDExtensionScriptInstanceInfo2 instead.
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
GDExtensionScriptInstanceSet set_func;
|
|
||||||
GDExtensionScriptInstanceGet get_func;
|
|
||||||
GDExtensionScriptInstanceGetPropertyList get_property_list_func;
|
|
||||||
GDExtensionScriptInstanceFreePropertyList free_property_list_func;
|
|
||||||
GDExtensionScriptInstanceGetClassCategory get_class_category_func; // Optional. Set to NULL for the default behavior.
|
|
||||||
|
|
||||||
GDExtensionScriptInstancePropertyCanRevert property_can_revert_func;
|
|
||||||
GDExtensionScriptInstancePropertyGetRevert property_get_revert_func;
|
|
||||||
|
|
||||||
GDExtensionScriptInstanceGetOwner get_owner_func;
|
|
||||||
GDExtensionScriptInstanceGetPropertyState get_property_state_func;
|
|
||||||
|
|
||||||
GDExtensionScriptInstanceGetMethodList get_method_list_func;
|
|
||||||
GDExtensionScriptInstanceFreeMethodList free_method_list_func;
|
|
||||||
GDExtensionScriptInstanceGetPropertyType get_property_type_func;
|
|
||||||
GDExtensionScriptInstanceValidateProperty validate_property_func;
|
|
||||||
|
|
||||||
GDExtensionScriptInstanceHasMethod has_method_func;
|
|
||||||
|
|
||||||
GDExtensionScriptInstanceCall call_func;
|
|
||||||
GDExtensionScriptInstanceNotification2 notification_func;
|
|
||||||
|
|
||||||
GDExtensionScriptInstanceToString to_string_func;
|
|
||||||
|
|
||||||
GDExtensionScriptInstanceRefCountIncremented refcount_incremented_func;
|
|
||||||
GDExtensionScriptInstanceRefCountDecremented refcount_decremented_func;
|
|
||||||
|
|
||||||
GDExtensionScriptInstanceGetScript get_script_func;
|
|
||||||
|
|
||||||
GDExtensionScriptInstanceIsPlaceholder is_placeholder_func;
|
|
||||||
|
|
||||||
GDExtensionScriptInstanceSet set_fallback_func;
|
|
||||||
GDExtensionScriptInstanceGet get_fallback_func;
|
|
||||||
|
|
||||||
GDExtensionScriptInstanceGetLanguage get_language_func;
|
|
||||||
|
|
||||||
GDExtensionScriptInstanceFree free_func;
|
|
||||||
|
|
||||||
} GDExtensionScriptInstanceInfo2; // Deprecated. Use GDExtensionScriptInstanceInfo3 instead.
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
GDExtensionScriptInstanceSet set_func;
|
GDExtensionScriptInstanceSet set_func;
|
||||||
|
@ -624,7 +552,7 @@ typedef struct {
|
||||||
|
|
||||||
GDExtensionScriptInstanceFree free_func;
|
GDExtensionScriptInstanceFree free_func;
|
||||||
|
|
||||||
} GDExtensionScriptInstanceInfo3;
|
} GDExtensionScriptInstanceInfo2;
|
||||||
|
|
||||||
/* INITIALIZATION */
|
/* INITIALIZATION */
|
||||||
|
|
||||||
|
@ -2378,7 +2306,7 @@ typedef void (*GDExtensionInterfaceRefSetObject)(GDExtensionRefPtr p_ref, GDExte
|
||||||
/**
|
/**
|
||||||
* @name script_instance_create
|
* @name script_instance_create
|
||||||
* @since 4.1
|
* @since 4.1
|
||||||
* @deprecated in Godot 4.2. Use `script_instance_create3` instead.
|
* @deprecated in Godot 4.2. Use `script_instance_create2` instead.
|
||||||
*
|
*
|
||||||
* Creates a script instance that contains the given info and instance data.
|
* Creates a script instance that contains the given info and instance data.
|
||||||
*
|
*
|
||||||
|
@ -2392,7 +2320,6 @@ typedef GDExtensionScriptInstancePtr (*GDExtensionInterfaceScriptInstanceCreate)
|
||||||
/**
|
/**
|
||||||
* @name script_instance_create2
|
* @name script_instance_create2
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
* @deprecated in Godot 4.3. Use `script_instance_create3` instead.
|
|
||||||
*
|
*
|
||||||
* Creates a script instance that contains the given info and instance data.
|
* Creates a script instance that contains the given info and instance data.
|
||||||
*
|
*
|
||||||
|
@ -2403,19 +2330,6 @@ typedef GDExtensionScriptInstancePtr (*GDExtensionInterfaceScriptInstanceCreate)
|
||||||
*/
|
*/
|
||||||
typedef GDExtensionScriptInstancePtr (*GDExtensionInterfaceScriptInstanceCreate2)(const GDExtensionScriptInstanceInfo2 *p_info, GDExtensionScriptInstanceDataPtr p_instance_data);
|
typedef GDExtensionScriptInstancePtr (*GDExtensionInterfaceScriptInstanceCreate2)(const GDExtensionScriptInstanceInfo2 *p_info, GDExtensionScriptInstanceDataPtr p_instance_data);
|
||||||
|
|
||||||
/**
|
|
||||||
* @name script_instance_create3
|
|
||||||
* @since 4.3
|
|
||||||
*
|
|
||||||
* Creates a script instance that contains the given info and instance data.
|
|
||||||
*
|
|
||||||
* @param p_info A pointer to a GDExtensionScriptInstanceInfo3 struct.
|
|
||||||
* @param p_instance_data A pointer to a data representing the script instance in the GDExtension. This will be passed to all the function pointers on p_info.
|
|
||||||
*
|
|
||||||
* @return A pointer to a ScriptInstanceExtension object.
|
|
||||||
*/
|
|
||||||
typedef GDExtensionScriptInstancePtr (*GDExtensionInterfaceScriptInstanceCreate3)(const GDExtensionScriptInstanceInfo3 *p_info, GDExtensionScriptInstanceDataPtr p_instance_data);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name placeholder_script_instance_create
|
* @name placeholder_script_instance_create
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
|
@ -2465,7 +2379,6 @@ typedef GDExtensionScriptInstanceDataPtr (*GDExtensionInterfaceObjectGetScriptIn
|
||||||
/**
|
/**
|
||||||
* @name callable_custom_create
|
* @name callable_custom_create
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
* @deprecated in Godot 4.3. Use `callable_custom_create2` instead.
|
|
||||||
*
|
*
|
||||||
* Creates a custom Callable object from a function pointer.
|
* Creates a custom Callable object from a function pointer.
|
||||||
*
|
*
|
||||||
|
@ -2476,19 +2389,6 @@ typedef GDExtensionScriptInstanceDataPtr (*GDExtensionInterfaceObjectGetScriptIn
|
||||||
*/
|
*/
|
||||||
typedef void (*GDExtensionInterfaceCallableCustomCreate)(GDExtensionUninitializedTypePtr r_callable, GDExtensionCallableCustomInfo *p_callable_custom_info);
|
typedef void (*GDExtensionInterfaceCallableCustomCreate)(GDExtensionUninitializedTypePtr r_callable, GDExtensionCallableCustomInfo *p_callable_custom_info);
|
||||||
|
|
||||||
/**
|
|
||||||
* @name callable_custom_create2
|
|
||||||
* @since 4.3
|
|
||||||
*
|
|
||||||
* Creates a custom Callable object from a function pointer.
|
|
||||||
*
|
|
||||||
* Provided struct can be safely freed once the function returns.
|
|
||||||
*
|
|
||||||
* @param r_callable A pointer that will receive the new Callable.
|
|
||||||
* @param p_callable_custom_info The info required to construct a Callable.
|
|
||||||
*/
|
|
||||||
typedef void (*GDExtensionInterfaceCallableCustomCreate2)(GDExtensionUninitializedTypePtr r_callable, GDExtensionCallableCustomInfo2 *p_callable_custom_info);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name callable_custom_get_userdata
|
* @name callable_custom_get_userdata
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
|
|
|
@ -165,11 +165,11 @@ extern "C" GDExtensionInterfaceObjectGetClassName gdextension_interface_object_g
|
||||||
extern "C" GDExtensionInterfaceObjectCastTo gdextension_interface_object_cast_to;
|
extern "C" GDExtensionInterfaceObjectCastTo gdextension_interface_object_cast_to;
|
||||||
extern "C" GDExtensionInterfaceObjectGetInstanceFromId gdextension_interface_object_get_instance_from_id;
|
extern "C" GDExtensionInterfaceObjectGetInstanceFromId gdextension_interface_object_get_instance_from_id;
|
||||||
extern "C" GDExtensionInterfaceObjectGetInstanceId gdextension_interface_object_get_instance_id;
|
extern "C" GDExtensionInterfaceObjectGetInstanceId gdextension_interface_object_get_instance_id;
|
||||||
extern "C" GDExtensionInterfaceCallableCustomCreate2 gdextension_interface_callable_custom_create2;
|
extern "C" GDExtensionInterfaceCallableCustomCreate gdextension_interface_callable_custom_create;
|
||||||
extern "C" GDExtensionInterfaceCallableCustomGetUserData gdextension_interface_callable_custom_get_userdata;
|
extern "C" GDExtensionInterfaceCallableCustomGetUserData gdextension_interface_callable_custom_get_userdata;
|
||||||
extern "C" GDExtensionInterfaceRefGetObject gdextension_interface_ref_get_object;
|
extern "C" GDExtensionInterfaceRefGetObject gdextension_interface_ref_get_object;
|
||||||
extern "C" GDExtensionInterfaceRefSetObject gdextension_interface_ref_set_object;
|
extern "C" GDExtensionInterfaceRefSetObject gdextension_interface_ref_set_object;
|
||||||
extern "C" GDExtensionInterfaceScriptInstanceCreate3 gdextension_interface_script_instance_create3;
|
extern "C" GDExtensionInterfaceScriptInstanceCreate2 gdextension_interface_script_instance_create2;
|
||||||
extern "C" GDExtensionInterfacePlaceHolderScriptInstanceCreate gdextension_interface_placeholder_script_instance_create;
|
extern "C" GDExtensionInterfacePlaceHolderScriptInstanceCreate gdextension_interface_placeholder_script_instance_create;
|
||||||
extern "C" GDExtensionInterfacePlaceHolderScriptInstanceUpdate gdextension_interface_placeholder_script_instance_update;
|
extern "C" GDExtensionInterfacePlaceHolderScriptInstanceUpdate gdextension_interface_placeholder_script_instance_update;
|
||||||
extern "C" GDExtensionInterfaceClassdbConstructObject gdextension_interface_classdb_construct_object;
|
extern "C" GDExtensionInterfaceClassdbConstructObject gdextension_interface_classdb_construct_object;
|
||||||
|
|
|
@ -171,11 +171,11 @@ GDExtensionInterfaceObjectGetClassName gdextension_interface_object_get_class_na
|
||||||
GDExtensionInterfaceObjectCastTo gdextension_interface_object_cast_to = nullptr;
|
GDExtensionInterfaceObjectCastTo gdextension_interface_object_cast_to = nullptr;
|
||||||
GDExtensionInterfaceObjectGetInstanceFromId gdextension_interface_object_get_instance_from_id = nullptr;
|
GDExtensionInterfaceObjectGetInstanceFromId gdextension_interface_object_get_instance_from_id = nullptr;
|
||||||
GDExtensionInterfaceObjectGetInstanceId gdextension_interface_object_get_instance_id = nullptr;
|
GDExtensionInterfaceObjectGetInstanceId gdextension_interface_object_get_instance_id = nullptr;
|
||||||
GDExtensionInterfaceCallableCustomCreate2 gdextension_interface_callable_custom_create2 = nullptr;
|
GDExtensionInterfaceCallableCustomCreate gdextension_interface_callable_custom_create = nullptr;
|
||||||
GDExtensionInterfaceCallableCustomGetUserData gdextension_interface_callable_custom_get_userdata = nullptr;
|
GDExtensionInterfaceCallableCustomGetUserData gdextension_interface_callable_custom_get_userdata = nullptr;
|
||||||
GDExtensionInterfaceRefGetObject gdextension_interface_ref_get_object = nullptr;
|
GDExtensionInterfaceRefGetObject gdextension_interface_ref_get_object = nullptr;
|
||||||
GDExtensionInterfaceRefSetObject gdextension_interface_ref_set_object = nullptr;
|
GDExtensionInterfaceRefSetObject gdextension_interface_ref_set_object = nullptr;
|
||||||
GDExtensionInterfaceScriptInstanceCreate3 gdextension_interface_script_instance_create3 = nullptr;
|
GDExtensionInterfaceScriptInstanceCreate2 gdextension_interface_script_instance_create2 = nullptr;
|
||||||
GDExtensionInterfacePlaceHolderScriptInstanceCreate gdextension_interface_placeholder_script_instance_create = nullptr;
|
GDExtensionInterfacePlaceHolderScriptInstanceCreate gdextension_interface_placeholder_script_instance_create = nullptr;
|
||||||
GDExtensionInterfacePlaceHolderScriptInstanceUpdate gdextension_interface_placeholder_script_instance_update = nullptr;
|
GDExtensionInterfacePlaceHolderScriptInstanceUpdate gdextension_interface_placeholder_script_instance_update = nullptr;
|
||||||
GDExtensionInterfaceClassdbConstructObject gdextension_interface_classdb_construct_object = nullptr;
|
GDExtensionInterfaceClassdbConstructObject gdextension_interface_classdb_construct_object = nullptr;
|
||||||
|
@ -408,11 +408,11 @@ GDExtensionBool GDExtensionBinding::init(GDExtensionInterfaceGetProcAddress p_ge
|
||||||
LOAD_PROC_ADDRESS(object_cast_to, GDExtensionInterfaceObjectCastTo);
|
LOAD_PROC_ADDRESS(object_cast_to, GDExtensionInterfaceObjectCastTo);
|
||||||
LOAD_PROC_ADDRESS(object_get_instance_from_id, GDExtensionInterfaceObjectGetInstanceFromId);
|
LOAD_PROC_ADDRESS(object_get_instance_from_id, GDExtensionInterfaceObjectGetInstanceFromId);
|
||||||
LOAD_PROC_ADDRESS(object_get_instance_id, GDExtensionInterfaceObjectGetInstanceId);
|
LOAD_PROC_ADDRESS(object_get_instance_id, GDExtensionInterfaceObjectGetInstanceId);
|
||||||
LOAD_PROC_ADDRESS(callable_custom_create2, GDExtensionInterfaceCallableCustomCreate2);
|
LOAD_PROC_ADDRESS(callable_custom_create, GDExtensionInterfaceCallableCustomCreate);
|
||||||
LOAD_PROC_ADDRESS(callable_custom_get_userdata, GDExtensionInterfaceCallableCustomGetUserData);
|
LOAD_PROC_ADDRESS(callable_custom_get_userdata, GDExtensionInterfaceCallableCustomGetUserData);
|
||||||
LOAD_PROC_ADDRESS(ref_get_object, GDExtensionInterfaceRefGetObject);
|
LOAD_PROC_ADDRESS(ref_get_object, GDExtensionInterfaceRefGetObject);
|
||||||
LOAD_PROC_ADDRESS(ref_set_object, GDExtensionInterfaceRefSetObject);
|
LOAD_PROC_ADDRESS(ref_set_object, GDExtensionInterfaceRefSetObject);
|
||||||
LOAD_PROC_ADDRESS(script_instance_create3, GDExtensionInterfaceScriptInstanceCreate3);
|
LOAD_PROC_ADDRESS(script_instance_create2, GDExtensionInterfaceScriptInstanceCreate2);
|
||||||
LOAD_PROC_ADDRESS(placeholder_script_instance_create, GDExtensionInterfacePlaceHolderScriptInstanceCreate);
|
LOAD_PROC_ADDRESS(placeholder_script_instance_create, GDExtensionInterfacePlaceHolderScriptInstanceCreate);
|
||||||
LOAD_PROC_ADDRESS(placeholder_script_instance_update, GDExtensionInterfacePlaceHolderScriptInstanceUpdate);
|
LOAD_PROC_ADDRESS(placeholder_script_instance_update, GDExtensionInterfacePlaceHolderScriptInstanceUpdate);
|
||||||
LOAD_PROC_ADDRESS(classdb_construct_object, GDExtensionInterfaceClassdbConstructObject);
|
LOAD_PROC_ADDRESS(classdb_construct_object, GDExtensionInterfaceClassdbConstructObject);
|
||||||
|
|
|
@ -99,7 +99,7 @@ bool CallableCustom::is_valid() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
Callable::Callable(CallableCustom *p_callable_custom) {
|
Callable::Callable(CallableCustom *p_callable_custom) {
|
||||||
GDExtensionCallableCustomInfo2 info = {};
|
GDExtensionCallableCustomInfo info = {};
|
||||||
info.callable_userdata = p_callable_custom;
|
info.callable_userdata = p_callable_custom;
|
||||||
info.token = internal::token;
|
info.token = internal::token;
|
||||||
info.object_id = p_callable_custom->get_object();
|
info.object_id = p_callable_custom->get_object();
|
||||||
|
@ -112,7 +112,7 @@ Callable::Callable(CallableCustom *p_callable_custom) {
|
||||||
info.to_string_func = &callable_custom_to_string;
|
info.to_string_func = &callable_custom_to_string;
|
||||||
info.get_argument_count_func = &custom_callable_get_argument_count_func;
|
info.get_argument_count_func = &custom_callable_get_argument_count_func;
|
||||||
|
|
||||||
::godot::internal::gdextension_interface_callable_custom_create2(_native_ptr(), &info);
|
::godot::internal::gdextension_interface_callable_custom_create(_native_ptr(), &info);
|
||||||
}
|
}
|
||||||
|
|
||||||
CallableCustom *Callable::get_custom() const {
|
CallableCustom *Callable::get_custom() const {
|
||||||
|
|
|
@ -98,7 +98,7 @@ void CallableCustomMethodPointerBase::_setup(uint32_t *p_base_ptr, uint32_t p_pt
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
Callable create_callable_from_ccmp(CallableCustomMethodPointerBase *p_callable_method_pointer) {
|
Callable create_callable_from_ccmp(CallableCustomMethodPointerBase *p_callable_method_pointer) {
|
||||||
GDExtensionCallableCustomInfo2 info = {};
|
GDExtensionCallableCustomInfo info = {};
|
||||||
info.callable_userdata = p_callable_method_pointer;
|
info.callable_userdata = p_callable_method_pointer;
|
||||||
info.token = internal::token;
|
info.token = internal::token;
|
||||||
info.object_id = p_callable_method_pointer->get_object();
|
info.object_id = p_callable_method_pointer->get_object();
|
||||||
|
@ -111,7 +111,7 @@ Callable create_callable_from_ccmp(CallableCustomMethodPointerBase *p_callable_m
|
||||||
info.get_argument_count_func = &custom_callable_mp_get_argument_count_func;
|
info.get_argument_count_func = &custom_callable_mp_get_argument_count_func;
|
||||||
|
|
||||||
Callable callable;
|
Callable callable;
|
||||||
::godot::internal::gdextension_interface_callable_custom_create2(callable._native_ptr(), &info);
|
::godot::internal::gdextension_interface_callable_custom_create(callable._native_ptr(), &info);
|
||||||
return callable;
|
return callable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue