@@ -201,7 +201,6 @@ void export_pointer(scope _memory)
201201 EXPOSE_GET_SET_TYPE (ulong_long, unsigned long long )
202202 EXPOSE_GET_SET_TYPE (float , float )
203203 EXPOSE_GET_SET_TYPE (double , double )
204- EXPOSE_GET_SET_TYPE (string_pointer, const char *)
205204
206205 .def (" get_pointer" ,
207206 &CPointer::GetPtr,
@@ -210,6 +209,12 @@ void export_pointer(scope _memory)
210209 manage_new_object_policy ()
211210 )
212211
212+ .def (" get_string_pointer" ,
213+ &CPointer::GetStringPointer,
214+ " Returns the value at the memory location." ,
215+ (arg (" offset" )=0 )
216+ )
217+
213218 .def (" get_string_array" ,
214219 &CPointer::GetStringArray,
215220 " Returns the value at the memory location." ,
@@ -222,10 +227,17 @@ void export_pointer(scope _memory)
222227 (" value" , arg (" offset" )=0 )
223228 )
224229
230+ .def (" set_string_pointer" ,
231+ &CPointer::SetStringPointer,
232+ " Sets the value at the given memory location. This string object must be deallocated by the user. Returns the string object." ,
233+ (" value" , arg ( " offset" )=0 ),
234+ manage_new_object_policy ()
235+ )
236+
225237 .def (" set_string_array" ,
226238 &CPointer::SetStringArray,
227239 " Sets the value at the given memory location." ,
228- (" value" ,arg ( " offset" )=0 )
240+ (" value" , arg ( " offset" )=0 )
229241 )
230242
231243 // Other methods
@@ -1048,6 +1060,7 @@ void export_global_variables(scope _memory)
10481060 ADD_NATIVE_TYPE_SIZE (" DOUBLE" , double )
10491061 ADD_NATIVE_TYPE_SIZE (" POINTER" , void *)
10501062 ADD_NATIVE_TYPE_SIZE (" STRING" , char *)
1063+ ADD_NATIVE_TYPE_SIZE (" STRING_POINTER" , char *)
10511064
10521065 _memory.attr (" NULL" ) = object (CPointer ());
10531066
0 commit comments