Skip to content

Commit 827fd85

Browse files
committed
fix cxx.cc MACRO; support for CxxString.
1 parent 7067a6c commit 827fd85

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/cxx.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -840,16 +840,19 @@ static_assert(sizeof(std::string) <= kMaxExpectedWordsInString * sizeof(void *),
840840

841841
#define FOR_EACH_TRIVIAL_STD_VECTOR_PTR(MACRO) \
842842
FOR_EACH_NUMERIC_WITH_PTR_PREFIX(MACRO) \
843-
MACRO(string, usize, std::size_t) \
844-
MACRO(string, isize, rust::isize)
843+
MACRO(ptrc, usize, std::size_t) \
844+
MACRO(ptrc, isize, rust::isize) \
845+
MACRO(ptrm, usize, std::size_t) \
846+
MACRO(ptrm, isize, rust::isize)
845847

846848
#define FOR_EACH_STD_VECTOR(MACRO) \
847849
FOR_EACH_TRIVIAL_STD_VECTOR(MACRO) \
848850
MACRO(string, std::string)
849851

850852
#define FOR_EACH_STD_VECTOR_PTR(MACRO) \
851853
FOR_EACH_TRIVIAL_STD_VECTOR_PTR(MACRO) \
852-
MACRO(string, string, std::string)
854+
MACRO(ptrc, string, std::string) \
855+
MACRO(ptrm, string, std::string)
853856

854857
#define FOR_EACH_RUST_VEC(MACRO) \
855858
FOR_EACH_NUMERIC(MACRO) \

src/cxx_vector.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,4 +862,7 @@ impl_ptr_vector_element_for_primitive!(ptrm, i32);
862862
impl_ptr_vector_element_for_primitive!(ptrm, i64);
863863
impl_ptr_vector_element_for_primitive!(ptrm, isize);
864864
impl_ptr_vector_element_for_primitive!(ptrm, f32);
865-
impl_ptr_vector_element_for_primitive!(ptrm, f64);
865+
impl_ptr_vector_element_for_primitive!(ptrm, f64);
866+
867+
impl_ptrc_vector_element!(opaque, "string", "CxxString", CxxString);
868+
impl_ptrm_vector_element!(opaque, "string", "CxxString", CxxString);

0 commit comments

Comments
 (0)