diff options
author | Dylan Baker <baker.dylan.c@gmail.com> | 2016-03-31 15:51:37 -0700 |
---|---|---|
committer | Dylan Baker <baker.dylan.c@gmail.com> | 2016-03-31 16:03:59 -0700 |
commit | 38bdba7be13924a3bc7d20b914c4fb3b6435b769 (patch) | |
tree | 1ab83c1263787e7f301a4e2a5887cae416da0132 | |
parent | 6464d06d42189b4c9eca05afbce3745a1b8ac21d (diff) |
glapi: glX_proto_send.py: Don't shadow builtins.
str is a builtin in python, although python doesn't prevent builtins
from being shadowed, its still a bad idea.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
-rw-r--r-- | src/mapi/glapi/gen/glX_proto_send.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mapi/glapi/gen/glX_proto_send.py b/src/mapi/glapi/gen/glX_proto_send.py index 8ea799a1d7..8fe0876bfc 100644 --- a/src/mapi/glapi/gen/glX_proto_send.py +++ b/src/mapi/glapi/gen/glX_proto_send.py @@ -38,18 +38,18 @@ import glX_proto_common import license -def convertStringForXCB(str): +def convertStringForXCB(string_): tmp = "" special = ["ARB"] i = 0 - while i < len(str): - if str[i:i+3] in special: - tmp = '%s_%s' % (tmp, str[i:i+3].lower()) + while i < len(string_): + if string_[i:i+3] in special: + tmp = '%s_%s' % (tmp, string_[i:i+3].lower()) i = i + 2 - elif str[i].isupper(): - tmp = '%s_%s' % (tmp, str[i].lower()) + elif string_[i].isupper(): + tmp = '%s_%s' % (tmp, string_[i].lower()) else: - tmp = '%s%s' % (tmp, str[i]) + tmp = '%s%s' % (tmp, string_[i]) i += 1 return tmp |