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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
2fd6d45b
Commit
2fd6d45b
authored
Apr 27, 2013
by
Nikita Nemkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Regression test for #42.
parent
02f6f212
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 @
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'))
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