Commit 47c41a3f authored by Robert Bradshaw's avatar Robert Bradshaw

Merge pull request #219 from nnemkin/T42_test

Regression test for #42.
parents 5045a869 2fd6d45b
# tag: cpp
PYTHON setup.py build_ext --inplace
PYTHON -c "import test"
######## test.pyx ########
# distutils: language = c++
cdef extern from "test.h":
ctypedef struct c_Test "Test":
const char *getString() except +RuntimeError
cdef class Test:
cdef c_Test *thisptr
def getString(self):
return self.thisptr.getString()
######## test.h ########
static const char *astring = "123";
class Test {
public:
const char *getString(void) { return astring; }
};
######## setup.py ########
from distutils.core import setup
from Cython.Build.Dependencies import cythonize
setup(name='test', ext_modules=cythonize('*.pyx'))
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