3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-27 23:03:51 +01:00
dft_tools/test/pytriqs/arrays/bug.pyx
Olivier Parcollet f2c7d449cc First commit : triqs libs version 1.0 alpha1
for earlier commits, see TRIQS0.x repository.
2013-07-17 19:24:07 +02:00

28 lines
484 B
Cython

#!python
cimport cython
cdef extern from "./bug.hpp" :
cdef cppclass Obj1 :
Obj1()
cdef class G_generic :
def __init__(self) :
pass
cdef class G_cython (G_generic) :
cdef Obj1 co
def __init__(self, A):
G_generic.__init__(self)
self.co = Obj1()
# Comment this and there is a memory leak
def __dealloc__(self) :
pass
class G (G_cython) :
def __init__(self, A):
G_cython.__init__(self,A)