Commit 2d9e5a65 authored by Robert Bradshaw's avatar Robert Bradshaw

Remove spurious const cast and warnings, niceident regex fix, all tests pass.

parent e607ac75
...@@ -1466,7 +1466,7 @@ class DefNode(FuncDefNode): ...@@ -1466,7 +1466,7 @@ class DefNode(FuncDefNode):
reqd_kw_flags = [] reqd_kw_flags = []
has_reqd_kwds = False has_reqd_kwds = False
code.put( code.put(
"static const char *%s[] = {" % "static char *%s[] = {" %
Naming.kwdlist_cname) Naming.kwdlist_cname)
for arg in self.args: for arg in self.args:
if arg.is_generic: if arg.is_generic:
...@@ -1618,8 +1618,7 @@ class DefNode(FuncDefNode): ...@@ -1618,8 +1618,7 @@ class DefNode(FuncDefNode):
code.putln('else {') code.putln('else {')
argformat = '"%s"' % string.join(arg_formats, "") argformat = '"%s"' % string.join(arg_formats, "")
pt_arglist = [Naming.args_cname, Naming.kwds_cname, argformat, pt_arglist = [Naming.args_cname, Naming.kwds_cname, argformat, Naming.kwdlist_cname] + arg_addrs
'(char **)/*temp.hack*/'+Naming.kwdlist_cname] + arg_addrs
pt_argstring = string.join(pt_arglist, ", ") pt_argstring = string.join(pt_arglist, ", ")
code.putln( code.putln(
'if (unlikely(!PyArg_ParseTupleAndKeywords(%s))) %s' % ( 'if (unlikely(!PyArg_ParseTupleAndKeywords(%s))) %s' % (
......
...@@ -17,7 +17,7 @@ import ControlFlow ...@@ -17,7 +17,7 @@ import ControlFlow
import __builtin__ import __builtin__
possible_identifier = re.compile(ur"(?![0-9])\w+$", re.U).match possible_identifier = re.compile(ur"(?![0-9])\w+$", re.U).match
nice_identifier = re.compile('[a-zA-Z0-0_]').match nice_identifier = re.compile('^[a-zA-Z0-0_]+$').match
class Entry: class Entry:
# A symbol table entry in a Scope or ModuleNamespace. # A symbol table entry in a Scope or ModuleNamespace.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment