GDExtension: change to_string signature to accept GDNativeStringPtr instead of returning const char*
This commit is contained in:
parent
a5eed70fa2
commit
f88bdac403
2 changed files with 4 additions and 2 deletions
|
@ -208,7 +208,7 @@ typedef struct {
|
||||||
typedef const GDNativePropertyInfo *(*GDNativeExtensionClassGetPropertyList)(GDExtensionClassInstancePtr p_instance, uint32_t *r_count);
|
typedef const GDNativePropertyInfo *(*GDNativeExtensionClassGetPropertyList)(GDExtensionClassInstancePtr p_instance, uint32_t *r_count);
|
||||||
typedef void (*GDNativeExtensionClassFreePropertyList)(GDExtensionClassInstancePtr p_instance, const GDNativePropertyInfo *p_list);
|
typedef void (*GDNativeExtensionClassFreePropertyList)(GDExtensionClassInstancePtr p_instance, const GDNativePropertyInfo *p_list);
|
||||||
typedef void (*GDNativeExtensionClassNotification)(GDExtensionClassInstancePtr p_instance, int32_t p_what);
|
typedef void (*GDNativeExtensionClassNotification)(GDExtensionClassInstancePtr p_instance, int32_t p_what);
|
||||||
typedef const char *(*GDNativeExtensionClassToString)(GDExtensionClassInstancePtr p_instance);
|
typedef void (*GDNativeExtensionClassToString)(GDExtensionClassInstancePtr p_instance, GDNativeStringPtr p_out);
|
||||||
typedef void (*GDNativeExtensionClassReference)(GDExtensionClassInstancePtr p_instance);
|
typedef void (*GDNativeExtensionClassReference)(GDExtensionClassInstancePtr p_instance);
|
||||||
typedef void (*GDNativeExtensionClassUnreference)(GDExtensionClassInstancePtr p_instance);
|
typedef void (*GDNativeExtensionClassUnreference)(GDExtensionClassInstancePtr p_instance);
|
||||||
typedef void (*GDNativeExtensionClassCallVirtual)(GDExtensionClassInstancePtr p_instance, const GDNativeTypePtr *p_args, GDNativeTypePtr r_ret);
|
typedef void (*GDNativeExtensionClassCallVirtual)(GDExtensionClassInstancePtr p_instance, const GDNativeTypePtr *p_args, GDNativeTypePtr r_ret);
|
||||||
|
|
|
@ -865,7 +865,9 @@ String Object::to_string() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_extension && _extension->to_string) {
|
if (_extension && _extension->to_string) {
|
||||||
return _extension->to_string(_extension_instance);
|
String ret;
|
||||||
|
_extension->to_string(_extension_instance, &ret);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
return "[" + get_class() + ":" + itos(get_instance_id()) + "]";
|
return "[" + get_class() + ":" + itos(get_instance_id()) + "]";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue