Преглед на файлове

Prepare fine-grained generation of datatype descriptions

Julius Pfrommer преди 7 години
родител
ревизия
97a284465a
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      tools/generate_datatypes.py

+ 3 - 2
tools/generate_datatypes.py

@@ -434,14 +434,15 @@ for builtin in builtin_types:
 for f in args.type_bsd:
 for f in args.type_bsd:
     parseTypeDefinitions(outname, f, args.namespace)
     parseTypeDefinitions(outname, f, args.namespace)
 
 
-
 typedescriptions = {}
 typedescriptions = {}
 for f in args.type_csv:
 for f in args.type_csv:
     typedescriptions = merge_dicts(typedescriptions, parseTypeDescriptions(f, args.namespace))
     typedescriptions = merge_dicts(typedescriptions, parseTypeDescriptions(f, args.namespace))
 
 
+# Read the selected data types
 selected_types = []
 selected_types = []
 for f in args.selected_types:
 for f in args.selected_types:
-    selected_types = list(filter(len, [line.strip() for line in f]))
+    selected_types += list(filter(len, [line.strip() for line in f]))
+# Use all types if none are selected
 if len(selected_types) == 0:
 if len(selected_types) == 0:
     selected_types = types.keys()
     selected_types = types.keys()