Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
47c41a3f
Commit
47c41a3f
authored
Apr 28, 2013
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #219 from nnemkin/T42_test
Regression test for #42.
parents
5045a869
2fd6d45b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
tests/compile/const_T42.srctree
tests/compile/const_T42.srctree
+30
-0
No files found.
tests/compile/const_T42.srctree
0 → 100644
View file @
47c41a3f
# 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'))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment