Commit ec25a63e authored by Robert Bradshaw's avatar Robert Bradshaw

merge

parents 7035d3e1 279557ca
...@@ -2353,12 +2353,12 @@ class SimpleCallNode(CallNode): ...@@ -2353,12 +2353,12 @@ class SimpleCallNode(CallNode):
"Python object cannot be passed as a varargs parameter") "Python object cannot be passed as a varargs parameter")
# Calc result type and code fragment # Calc result type and code fragment
self.type = func_type.return_type self.type = func_type.return_type
if self.type.is_pyobject \ if self.type.is_pyobject:
or func_type.exception_value is not None \ self.result_ctype = py_object_type
or func_type.exception_check: self.is_temp = 1
self.is_temp = 1 elif func_type.exception_value is not None \
if self.type.is_pyobject: or func_type.exception_check:
self.result_ctype = py_object_type self.is_temp = 1
# C++ exception handler # C++ exception handler
if func_type.exception_check == '+': if func_type.exception_check == '+':
if func_type.exception_value is None: if func_type.exception_value is None:
......
...@@ -517,7 +517,7 @@ class CIntType(CNumericType): ...@@ -517,7 +517,7 @@ class CIntType(CNumericType):
c_type = self.sign_and_name() c_type = self.sign_and_name()
c_name = c_type.replace(' ', '_'); c_name = c_type.replace(' ', '_');
func_name = "__pyx_PyInt_%s" % c_name; func_name = "__pyx_PyInt_%s" % c_name;
if not int_conversion_list.has_key(func_name): if func_name not in int_conversion_list:
# no env to add utility code to # no env to add utility code to
global type_conversion_predeclarations, type_conversion_functions global type_conversion_predeclarations, type_conversion_functions
if self.signed: if self.signed:
......
...@@ -282,8 +282,8 @@ class Scope: ...@@ -282,8 +282,8 @@ class Scope:
if not self.in_cinclude and cname and re.match("^_[_A-Z]+$", cname): if not self.in_cinclude and cname and re.match("^_[_A-Z]+$", cname):
# See http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html#Reserved-Names # See http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html#Reserved-Names
warning(pos, "'%s' is a reserved name in C." % cname, -1) warning(pos, "'%s' is a reserved name in C." % cname, -1)
dict = self.entries entries = self.entries
if name and dict.has_key(name): if name and name in entries:
if visibility == 'extern': if visibility == 'extern':
warning(pos, "'%s' redeclared " % name, 0) warning(pos, "'%s' redeclared " % name, 0)
elif visibility != 'ignore': elif visibility != 'ignore':
...@@ -292,7 +292,7 @@ class Scope: ...@@ -292,7 +292,7 @@ class Scope:
entry.in_cinclude = self.in_cinclude entry.in_cinclude = self.in_cinclude
if name: if name:
entry.qualified_name = self.qualify_name(name) entry.qualified_name = self.qualify_name(name)
dict[name] = entry entries[name] = entry
entry.scope = self entry.scope = self
entry.visibility = visibility entry.visibility = visibility
return entry return entry
......
...@@ -83,7 +83,7 @@ def CodeRanges(code_list): ...@@ -83,7 +83,7 @@ def CodeRanges(code_list):
re_list = [] re_list = []
for i in xrange(0, len(code_list), 2): for i in xrange(0, len(code_list), 2):
re_list.append(CodeRange(code_list[i], code_list[i + 1])) re_list.append(CodeRange(code_list[i], code_list[i + 1]))
return apply(Alt, tuple(re_list)) return Alt(*re_list)
def CodeRange(code1, code2): def CodeRange(code1, code2):
""" """
......
...@@ -3,7 +3,7 @@ the installed distutils infrastructure. Call: ...@@ -3,7 +3,7 @@ the installed distutils infrastructure. Call:
out_fname = pyx_to_dll("foo.pyx") out_fname = pyx_to_dll("foo.pyx")
""" """
import os, md5 import os
import distutils import distutils
from distutils.dist import Distribution from distutils.dist import Distribution
......
This diff is collapsed.
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