diff --git a/tests/run/cpp_classes.pyx b/tests/run/cpp_classes.pyx index 056ae81e776eddf61438b357def9a438d5fb573c..84cbfaa03ceed7eeb4369e605fddc00b8c2cd86d 100644 --- a/tests/run/cpp_classes.pyx +++ b/tests/run/cpp_classes.pyx @@ -23,7 +23,7 @@ cdef extern from "shapes.h" namespace shapes: cdef cppclass Square(Rectangle): int side - # __init__(int) # need function overloading + __init__(int) int constructor_count, destructor_count @@ -41,7 +41,7 @@ def test_rect_area(w, h): del rect def test_square_area(w): - cdef Square *sqr = new Square(w, w) + cdef Square *sqr = new Square(w) cdef Rectangle *rect = sqr try: return rect.area(), sqr.area() diff --git a/tests/run/shapes.h b/tests/run/shapes.h index 3106d01c0cf35b3ba27d468214cb9b4af78e6581..033a30b83ae5ac663b50dbbc037f44e5294fe3b6 100644 --- a/tests/run/shapes.h +++ b/tests/run/shapes.h @@ -31,8 +31,6 @@ namespace shapes { { public: Square(int side) : Rectangle(side, side) { this->side = side; } - /* need until function overloading in Cython */ - Square(int side, int ignored) : Rectangle(side, side) { this->side = side; } int side; };