From: Robert Bradshaw Date: Sat, 7 Jun 2008 17:45:33 +0000 (-0700) Subject: Remove spurious const cast and warnings, niceident regex fix, all tests pass. X-Git-Tag: 0.9.8rc1~11^2~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2d9e5a65f1a13084f701e1a2330a091883ef53c2;p=cython.git Remove spurious const cast and warnings, niceident regex fix, all tests pass. --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 772b7898..d668b38e 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -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' % ( diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index c6a41ae5..485215a7 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -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.