-
Notifications
You must be signed in to change notification settings - Fork 9
Description
The crate documentation says this about MArray<T>:
MArray<T>— A null-terminated array, which can be used to represent e.g. array of C strings terminated by a null pointer.
However, there are no examples anywhere and I can't figure out how to do this. I've been using my own non-generic version of MArray, as well as my own own version of MString (or rather, MBox<CStr>) so far, where I have just casted from *mut *mut c_char to *mut MallocCString, based on the assumption that MallocCString, which is just a tuple struct containing a *mut c_char, has the same representation as the plain *mut c_char. But I'd like to cut down on the amount of stuff I'm reimplementing in my crate, as well as my rather uneducated use of unsafe.
My current code can be found here, for reference.