summaryrefslogtreecommitdiffstats
path: root/src/mapi/glapi/gen/gl_XML.py
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2012-10-10 11:01:35 -0700
committerPaul Berry <[email protected]>2012-10-16 12:03:55 -0700
commit7dc052b12bb8341a57151e1f3cefb8f9d15d5192 (patch)
tree69507205e257e65566425e7e6c83edd14775ec09 /src/mapi/glapi/gen/gl_XML.py
parent41954107c00d68869f0316126908e873662b4c6d (diff)
glapi: use new-style Python classes.
An unfortunate quirk of Python 2 is that there are two types of classes: "classic" classes (which are backward compatible with some unfortunate design decisions made early in Python's history), and "new-style" classes. Classic classes have a number of limitations (for example they don't support super()) and are unavailable in Python 3. There's really no reason to use classic classes, except in unmaintained legacy code. For more information see http://www.python.org/download/releases/2.2.3/descrintro/. This patch upgrades the Python code in src/mapi/glapi/gen to use exclusively new-style classes. Tested-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mapi/glapi/gen/gl_XML.py')
-rw-r--r--src/mapi/glapi/gen/gl_XML.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py
index ce14a416d5a..f956730f2e0 100644
--- a/src/mapi/glapi/gen/gl_XML.py
+++ b/src/mapi/glapi/gen/gl_XML.py
@@ -72,7 +72,7 @@ def is_attr_true( element, name ):
raise RuntimeError('Invalid value "%s" for boolean "%s".' % (value, name))
-class gl_print_base:
+class gl_print_base(object):
"""Base class of all API pretty-printers.
In the model-view-controller pattern, this is the view. Any derived
@@ -322,7 +322,7 @@ def create_parameter_string(parameters, include_names):
return string.join(list, ", ")
-class gl_item:
+class gl_item(object):
def __init__(self, element, context):
self.context = context
self.name = element.nsProp( "name", None )
@@ -401,7 +401,7 @@ class gl_enum( gl_item ):
-class gl_parameter:
+class gl_parameter(object):
def __init__(self, element, context):
self.name = element.nsProp( "name", None )
@@ -780,7 +780,7 @@ class gl_function( gl_item ):
return "_dispatch_stub_%u" % (self.offset)
-class gl_item_factory:
+class gl_item_factory(object):
"""Factory to create objects derived from gl_item."""
def create_item(self, item_name, element, context):
@@ -798,7 +798,7 @@ class gl_item_factory:
return None
-class gl_api:
+class gl_api(object):
def __init__(self, factory):
self.functions_by_name = {}
self.enums_by_name = {}