Commit ef6b67f7 authored by Robert Bradshaw's avatar Robert Bradshaw

Merge pull request #515 from aldanor/fix-namespace-mangling

Fix mangling for C++ namespaced types
parents 46d3efc4 a0c69335
......@@ -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):
......
......@@ -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
......
# 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')
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