Skip to content

Commit

Permalink
Update godot_nativescript.h (breaking changes in godot_property_hint)
Browse files Browse the repository at this point in the history
GDNative API introduced breaking changes here by adding enum constants in the middle,
severing compatibility of current godot-rust with Godot versions prior to 3.5(.1).

This change was already applied to api.json, but not the C API itself.
  • Loading branch information
Bromeon committed Jan 21, 2023
1 parent a2a85e1 commit 291ad0a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions gdnative-sys/godot_headers/nativescript/godot_nativescript.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
Expand Down Expand Up @@ -61,8 +61,10 @@ typedef enum {
GODOT_PROPERTY_HINT_FLAGS, ///< hint_text= "flag1,flag2,etc" (as bit flags)
GODOT_PROPERTY_HINT_LAYERS_2D_RENDER,
GODOT_PROPERTY_HINT_LAYERS_2D_PHYSICS,
GODOT_PROPERTY_HINT_LAYERS_2D_NAVIGATION,
GODOT_PROPERTY_HINT_LAYERS_3D_RENDER,
GODOT_PROPERTY_HINT_LAYERS_3D_PHYSICS,
GODOT_PROPERTY_HINT_LAYERS_3D_NAVIGATION,
GODOT_PROPERTY_HINT_FILE, ///< a file path must be passed, hint_text (optionally) is a filter "*.png,*.wav,*.doc,"
GODOT_PROPERTY_HINT_DIR, ///< a directory path must be passed
GODOT_PROPERTY_HINT_GLOBAL_FILE, ///< a file path must be passed, hint_text (optionally) is a filter "*.png,*.wav,*.doc,"
Expand Down Expand Up @@ -145,7 +147,7 @@ typedef struct {
} godot_method_attributes;

typedef struct {
// instance pointer, method data, user data, num args, args - return result as varaint
// instance pointer, method data, user data, num args, args - return result as variant
GDCALLINGCONV godot_variant (*method)(godot_object *, void *, void *, int, godot_variant **);
void *method_data;
GDCALLINGCONV void (*free_func)(void *);
Expand Down Expand Up @@ -247,4 +249,4 @@ void GDAPI godot_nativescript_profiling_add_data(const char *p_signature, uint64
}
#endif

#endif
#endif // GODOT_NATIVESCRIPT_H

0 comments on commit 291ad0a

Please sign in to comment.