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
ef6b67f7
Commit
ef6b67f7
authored
May 17, 2016
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #515 from aldanor/fix-namespace-mangling
Fix mangling for C++ namespaced types
parents
46d3efc4
a0c69335
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
Cython/Compiler/Buffer.py
Cython/Compiler/Buffer.py
+1
-0
tests/bugs.txt
tests/bugs.txt
+1
-1
tests/compile/cpp_structs.pyx
tests/compile/cpp_structs.pyx
+4
-0
No files found.
Cython/Compiler/Buffer.py
View file @
ef6b67f7
...
...
@@ -633,6 +633,7 @@ def mangle_dtype_name(dtype):
prefix
=
""
type_decl
=
dtype
.
empty_declaration_code
()
type_decl
=
type_decl
.
replace
(
" "
,
"_"
)
type_decl
=
type_decl
.
replace
(
"::"
,
"_pyxns_"
)
return
prefix
+
type_decl
.
replace
(
"["
,
"_"
).
replace
(
"]"
,
"_"
)
def
get_type_information_cname
(
code
,
dtype
,
maxdepth
=
None
):
...
...
tests/bugs.txt
View file @
ef6b67f7
...
...
@@ -5,7 +5,7 @@ class_attribute_init_values_T18
unsignedbehaviour_T184
missing_baseclass_in_predecl_T262
cfunc_call_tuple_args_T408
cpp_structs
#
cpp_structs
genexpr_iterable_lookup_T600
generator_expressions_in_class
for_from_pyvar_loop_T601
...
...
tests/compile/cpp_structs.pyx
View file @
ef6b67f7
# tag: cpp
# mode: compile
from
cython.view
import
array
cdef
extern
from
"point.h"
namespace
"geometry"
:
cdef
struct
Point
:
...
...
@@ -10,3 +12,5 @@ cdef extern from "point.h" namespace "geometry":
cdef
Point
p
=
Point
(
0.0
,
0.0
,
0
)
the_point
=
p
cdef
Point
[::
1
]
ps
=
array
((
10
,),
itemsize
=
sizeof
(
Point
),
format
=
'ddi'
)
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