Remove spurious const cast and warnings, niceident regex fix, all tests pass.
authorRobert Bradshaw <robertwb@math.washington.edu>
Sat, 7 Jun 2008 17:45:33 +0000 (10:45 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sat, 7 Jun 2008 17:45:33 +0000 (10:45 -0700)
Cython/Compiler/Nodes.py
Cython/Compiler/Symtab.py

index 772b789851b8a7a359a03a35793a4cc24f16b49e..d668b38e692379c0f767f33c485d65dc0cf85783 100644 (file)
@@ -1466,7 +1466,7 @@ class DefNode(FuncDefNode):
             reqd_kw_flags = []
             has_reqd_kwds = False
             code.put(
-                "static const char *%s[] = {" %
+                "static char *%s[] = {" %
                     Naming.kwdlist_cname)
             for arg in self.args:
                 if arg.is_generic:
@@ -1618,8 +1618,7 @@ class DefNode(FuncDefNode):
             code.putln('else {')
 
         argformat = '"%s"' % string.join(arg_formats, "")
-        pt_arglist = [Naming.args_cname, Naming.kwds_cname, argformat,
-                      '(char **)/*temp.hack*/'+Naming.kwdlist_cname] + arg_addrs
+        pt_arglist = [Naming.args_cname, Naming.kwds_cname, argformat, Naming.kwdlist_cname] + arg_addrs
         pt_argstring = string.join(pt_arglist, ", ")
         code.putln(
             'if (unlikely(!PyArg_ParseTupleAndKeywords(%s))) %s' % (
index c6a41ae59eb44833aeb4b53ebbbcef906122da7a..485215a7ab751de576dd59fb98ec6c41f5e4ce23 100644 (file)
@@ -17,7 +17,7 @@ import ControlFlow
 import __builtin__
 
 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:
     # A symbol table entry in a Scope or ModuleNamespace.