summaryrefslogtreecommitdiff
path: root/src/mapi/glapi/gen/gl_XML.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapi/glapi/gen/gl_XML.py')
-rw-r--r--src/mapi/glapi/gen/gl_XML.py25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py
index f1606a6cfa..7e08c3bfd8 100644
--- a/src/mapi/glapi/gen/gl_XML.py
+++ b/src/mapi/glapi/gen/gl_XML.py
@@ -455,7 +455,7 @@ class gl_parameter(object):
self.is_padding = is_attr_true(element, 'padding')
def compatible(self, other):
- return 1
+ return True
def is_array(self):
return self.is_pointer()
@@ -464,10 +464,7 @@ class gl_parameter(object):
return self.type_expr.is_pointer()
def is_image(self):
- if self.width:
- return 1
- else:
- return 0
+ return bool(self.width)
def is_variable_length(self):
return len(self.count_parameter_list) or self.counter
@@ -475,13 +472,9 @@ class gl_parameter(object):
def is_64_bit(self):
count = self.type_expr.get_element_count()
if count:
- if (self.size() / count) == 8:
- return 1
+ return (self.size() / count) == 8
else:
- if self.size() == 8:
- return 1
-
- return 0
+ return self.size() == 8
def string(self):
return self.type_expr.original_string + " " + self.name
@@ -532,7 +525,7 @@ class gl_parameter(object):
return c
- def size_string(self, use_parens=1):
+ def size_string(self, use_parens=True):
s = self.size()
if self.counter or self.count_parameter_list:
list = ["compsize"]
@@ -571,7 +564,7 @@ class gl_function(gl_item):
self.return_type = "void"
self.parameters = []
self.offset = -1
- self.initialized = 0
+ self.initialized = False
self.images = []
self.exec_flavor = 'mesa'
self.desktop = True
@@ -663,9 +656,9 @@ class gl_function(gl_item):
raise RuntimeError("Function true name redefined. Was %s, now %s." % (self.name, true_name))
# There are two possible cases. The first time an entry-point
- # with data is seen, self.initialized will be 0. On that
+ # with data is seen, self.initialized will be False. On that
# pass, we just fill in the data. The next time an
- # entry-point with data is seen, self.initialized will be 1.
+ # entry-point with data is seen, self.initialized will be True.
# On that pass we have to make that the new values match the
# valuse from the previous entry-point.
@@ -700,7 +693,7 @@ class gl_function(gl_item):
self.images.append(param)
if element.getchildren():
- self.initialized = 1
+ self.initialized = True
self.entry_point_parameters[name] = parameters
else:
self.entry_point_parameters[name] = []