diff options
author | Thomas Herzog <karroffel@users.noreply.github.com> | 2017-04-10 22:30:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-10 22:30:57 +0200 |
commit | 2ac0cf568d8ecc04dfdb772330b26831f64bdfb9 (patch) | |
tree | a91e6b7203638db8d4be6eda22412164b8fd6a94 | |
parent | a1413b9a68426027c29542f4b450f551dbd1d494 (diff) | |
parent | c562cc9ea095e6704bfe9050d03ed77823c3c760 (diff) |
Merge pull request #8350 from karroffel/gdnative-api-reference-field
[GDNative] added is_reference filed to api.json
-rw-r--r-- | modules/gdnative/api_generator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/gdnative/api_generator.cpp b/modules/gdnative/api_generator.cpp index f5d010f0a2..8569ae078e 100644 --- a/modules/gdnative/api_generator.cpp +++ b/modules/gdnative/api_generator.cpp @@ -103,8 +103,7 @@ struct ClassAPI { bool is_instanciable; // @Unclear bool is_creatable; - // @Unclear - bool memory_own; + bool is_reference; List<MethodAPI> methods; List<PropertyAPI> properties; @@ -161,7 +160,7 @@ List<ClassAPI> generate_c_api_classes() { ClassDB::get_inheriters_from_class("Reference", &inheriters); is_reference = !!inheriters.find(class_name); // @Unclear - class_api.memory_own = !class_api.is_singleton && is_reference; + class_api.is_reference = !class_api.is_singleton && is_reference; } // constants @@ -348,6 +347,7 @@ static List<String> generate_c_api_json(const List<ClassAPI> &p_api) { source.push_back(String("\t\t\"api_type\": \"") + (api.api_type == ClassDB::API_CORE ? "core" : (api.api_type == ClassDB::API_EDITOR ? "tools" : "none")) + "\",\n"); source.push_back(String("\t\t\"singleton\": ") + (api.is_singleton ? "true" : "false") + ",\n"); source.push_back(String("\t\t\"instanciable\": ") + (api.is_instanciable ? "true" : "false") + ",\n"); + source.push_back(String("\t\t\"is_reference\": ") + (api.is_reference ? "true" : "false") + ",\n"); // @Unclear // source.push_back(String("\t\t\"createable\": ") + (api.is_creatable ? "true" : "false") + ",\n"); |