diff options
author | Dylan Baker <baker.dylan.c@gmail.com> | 2015-02-18 14:45:40 -0800 |
---|---|---|
committer | Dylan Baker <baker.dylan.c@gmail.com> | 2015-02-18 14:54:06 -0800 |
commit | dd5087e9104e0d46393e3abf794b4b36f835bdc3 (patch) | |
tree | c8c212b67c1e06feac6fd2c70e6f2f5489223b64 | |
parent | 7a6b1faf9f96a8f46dc8298981e377c7f4ae2e42 (diff) |
glapi: glX_server_table.py: replace use of has_key with "in" keyword
has_key is deprecated, and since part of the goal of this series is to
be able to use either python2 or python3 we shouldn't use very old
python2 only methods.
-rw-r--r-- | src/mapi/glapi/gen/glX_server_table.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mapi/glapi/gen/glX_server_table.py b/src/mapi/glapi/gen/glX_server_table.py index 0cc2143f37..7d23669877 100644 --- a/src/mapi/glapi/gen/glX_server_table.py +++ b/src/mapi/glapi/gen/glX_server_table.py @@ -107,7 +107,7 @@ class function_table: empty = 0 for j in xrange(i, i + op_count): - if self.functions.has_key(j): + if j in self.functions: used += 1; else: empty += 1; @@ -156,7 +156,7 @@ class function_table: def is_empty_leaf(self, base_opcode, M): for op in xrange(base_opcode, base_opcode + (1 << M)): - if self.functions.has_key(op): + if op in self.functions: return False return True @@ -193,7 +193,7 @@ class function_table: print ' LEAF(%u),' % (len(self.lookup_table)) for op in xrange(child_base_opcode, child_base_opcode + (1 << child_M)): - if self.functions.has_key(op): + if op in self.functions: func = self.functions[op] size = func.command_fixed_length() |