diff options
author | Dylan Baker <baker.dylan.c@gmail.com> | 2015-02-18 14:41:15 -0800 |
---|---|---|
committer | Dylan Baker <baker.dylan.c@gmail.com> | 2015-02-18 14:41:15 -0800 |
commit | 718fb25b7fc3628b5e7832d493ace6f1d62a04ee (patch) | |
tree | ce9f5dbb11eca2c0df9c10892b3dccc64167f592 | |
parent | f7e77704cb081088a937de5b8ae332484f0f4fc8 (diff) |
glapi: glX_server_table.py: Use bools instead of ints.
Python has sensible, builtin bool types. Use them.
-rw-r--r-- | src/mapi/glapi/gen/glX_server_table.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mapi/glapi/gen/glX_server_table.py b/src/mapi/glapi/gen/glX_server_table.py index 5e9b2148c4..e1b4bc6172 100644 --- a/src/mapi/glapi/gen/glX_server_table.py +++ b/src/mapi/glapi/gen/glX_server_table.py @@ -132,7 +132,7 @@ class function_table: children = [] count = 1 depth = 1 - all_children_are_nonempty_leaf_nodes = 1 + all_children_are_nonempty_leaf_nodes = True for i in range(min_opcode, next_opcode, op_count): n = self.divide_group(i, total + M) @@ -157,10 +157,10 @@ class function_table: def is_empty_leaf(self, base_opcode, M): for op in range(base_opcode, base_opcode + (1 << M)): if self.functions.has_key(op): - return 0 + return False break - return 1 + return True def dump_tree(self, node, base_opcode, remaining_bits, base_entry, depth): @@ -351,9 +351,9 @@ class PrintGlxDispatchTables(glX_proto_common.glx_print_proto): self.name = "glX_server_table.py (from Mesa)" self.license = license.bsd_license_template % ( "(C) Copyright IBM Corporation 2005, 2006", "IBM") - self.rop_functions = function_table("Render", 1) - self.sop_functions = function_table("Single", 0) - self.vop_functions = function_table("VendorPriv", 0) + self.rop_functions = function_table("Render", True) + self.sop_functions = function_table("Single", False) + self.vop_functions = function_table("VendorPriv", False) return |