diff options
-rw-r--r-- | doc/tools/doc_status.py | 15 | ||||
-rw-r--r-- | modules/gdnative/SCsub | 9 |
2 files changed, 22 insertions, 2 deletions
diff --git a/doc/tools/doc_status.py b/doc/tools/doc_status.py index 75e18bbe81..6b936899d8 100644 --- a/doc/tools/doc_status.py +++ b/doc/tools/doc_status.py @@ -23,6 +23,7 @@ flags = { 'o': True, 'i': False, 'a': True, + 'e': False, } flag_descriptions = { 'c': 'Toggle colors when outputting.', @@ -35,6 +36,7 @@ flag_descriptions = { 'o': 'Toggle overall column.', 'i': 'Toggle collapse of class items columns.', 'a': 'Toggle showing all items.', + 'e': 'Toggle hiding empty items.', } long_flags = { 'colors': 'c', @@ -64,6 +66,8 @@ long_flags = { 'collapse': 'i', 'all': 'a', + + 'empty': 'e', } table_columns = ['name', 'brief_description', 'description', 'methods', 'constants', 'members', 'signals'] table_column_names = ['Name', 'Brief Desc.', 'Desc.', 'Methods', 'Constants', 'Members', 'Signals'] @@ -192,6 +196,14 @@ class ClassStatus: ok = ok and self.progresses[k].is_ok() return ok + def is_empty(self): + sum = 0 + for k in self.progresses: + if self.progresses[k].is_ok(): + continue + sum += self.progresses[k].total + return sum < 1 + def make_output(self): output = {} output['name'] = color('name', self.name) @@ -396,6 +408,9 @@ for cn in filtered_classes: if (flags['b'] and status.is_ok()) or (flags['g'] and not status.is_ok()) or (not flags['a']): continue + if flags['e'] and status.is_empty(): + continue + out = status.make_output() row = [] for column in table_columns: diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub index 4e5f155f45..be0975b53c 100644 --- a/modules/gdnative/SCsub +++ b/modules/gdnative/SCsub @@ -30,7 +30,9 @@ def _build_gdnative_api_struct_header(api): 'extern "C" {', '#endif', '', - 'typedef struct godot_gdnative_api_struct {' + 'typedef struct godot_gdnative_api_struct {', + '\tvoid *next;', + '\tconst char *version;', ] for funcname, funcdef in api['api'].items(): @@ -55,7 +57,10 @@ def _build_gdnative_api_struct_source(api): '', '#include <gdnative_api_struct.gen.h>', '', - 'extern const godot_gdnative_api_struct api_struct = {' + 'const char *_gdnative_api_version = "%s";' % api['version'], + 'extern const godot_gdnative_api_struct api_struct = {', + '\tNULL,', + '\t_gdnative_api_version,', ] for funcname in api['api'].keys(): |