from __future__ import print_function
import gl_XML, glX_XML
-import string
class glx_proto_item_factory(glX_XML.glx_item_factory):
return compsize
elif len(param.count_parameter_list):
- parameters = string.join( param.count_parameter_list, "," )
+ parameters = ",".join( param.count_parameter_list )
compsize = "__gl%s_size(%s)" % (func.name, parameters)
return compsize
import argparse
import gl_XML, glX_XML, glX_proto_common, license
-import copy, string
+import copy
def convertStringForXCB(str):
tmp = ""
i = 0
while i < len(str):
if str[i:i+3] in special:
- tmp = '%s_%s' % (tmp, string.lower(str[i:i+3]))
+ tmp = '%s_%s' % (tmp, str[i:i+3].lower())
i = i + 2;
elif str[i].isupper():
- tmp = '%s_%s' % (tmp, string.lower(str[i]))
+ tmp = '%s_%s' % (tmp, str[i].lower())
else:
tmp = '%s%s' % (tmp, str[i])
i += 1
if len( condition_list ) > 0:
if len( condition_list ) > 1:
- skip_condition = "(%s)" % (string.join( condition_list, ") && (" ))
+ skip_condition = "(%s)" % ") && (".join( condition_list )
else:
skip_condition = "%s" % (condition_list.pop(0))
from collections import OrderedDict
from decimal import Decimal
import xml.etree.ElementTree as ET
-import re, sys, string
+import re, sys
import os.path
import typeexpr
import static_data
if len(list) == 0: list = ["void"]
- return string.join(list, ", ")
+ return ", ".join(list)
class gl_item(object):
list.append( str(s) )
if len(list) > 1 and use_parens :
- return "safe_mul(%s)" % (string.join(list, ", "))
+ return "safe_mul(%s)" % ", ".join(list)
else:
- return string.join(list, " * ")
+ return " * ".join(list)
elif self.is_image():
return "compsize"
from __future__ import print_function
-import string, copy
+import copy
class type_node(object):
def __init__(self):
# Replace '*' with ' * ' in type_string. Then, split the string
# into tokens, separated by spaces.
- tokens = string.split( string.replace( type_string, "*", " * " ) )
+ tokens = type_string.replace("*", " * ").split()
const = 0
t = None