merge
authorRobert Bradshaw <robertwb@math.washington.edu>
Sat, 20 Feb 2010 02:06:37 +0000 (18:06 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sat, 20 Feb 2010 02:06:37 +0000 (18:06 -0800)
1  2 
Cython/Compiler/ExprNodes.py
Cython/Compiler/Parsing.py
Cython/Compiler/PyrexTypes.py
Cython/Compiler/Symtab.py
tests/run/cpp_templates.pyx

Simple merge
Simple merge
Simple merge
index 9253f642490e4bc6eedb634d08a58e74252df8aa,631c5f89e15477c4a663eabc6eaedb9ec3943094..a031e97ce7e641d638019dbc35bb76562e02aaa8
@@@ -1562,8 -1535,8 +1565,9 @@@ class CppClassScope(Scope)
              cname = None, visibility = 'extern', defining = 0,
              api = 0, in_pxd = 0, modifiers = ()):
          if name == self.name.split('::')[-1] and cname is None:
 +            self.check_base_default_constructor(pos)
              name = '<init>'
+             type.return_type = self.lookup(self.name).type
          prev_entry = self.lookup_here(name)
          entry = self.declare_var(name, type, pos, cname, visibility)
          if prev_entry:
index 11944a5359d1804377f74d08f00436333eb491e2,1a700feac9f51da79c40659f74e9edcfb6c462bc..e29bceae41527232b641d693730c9fbfab59654e
@@@ -61,33 -58,4 +58,31 @@@ def test_pair(int i, double x)
      finally:
          del pair
  
-     cdef Wrap[int*] *w
 +def test_ptr(int i):
 +    """
 +    >>> test_ptr(3)
 +    3
 +    >>> test_ptr(5)
 +    5
 +    """
 +    try:
 +        w = new Wrap[int*](&i)
 +        return deref(w.get())
 +    finally:
 +        del w
 +
 +cdef double f(double x):
 +    return x*x
  
-     cdef Wrap[double (*)(double)] *w
 +def test_func_ptr(double x):
 +    """
 +    >>> test_func_ptr(3)
 +    9.0
 +    >>> test_func_ptr(-1.5)
 +    2.25
 +    """
 +    try:
 +        w = new Wrap[double (*)(double)](&f)
 +        return w.get()(x)
 +    finally:
 +        del w