You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It might be more sensible to reduce the automation in this sense. Perhaps use the following mappings:
BStr - BSTR
OsString - WCHAR* on Windows, char* on Linux.
String - char* everywhere. Essentially being std::string compatible.
Eager implement for AsRef/From/etc. on BStr would be needed for this to be sensible.
On Windows BStr would be allocated with SysAllocString while everything else would use the CoTaskMemAlloc APIs. Not sure what the equivalent on Linux would be, if any. The fallback for both systems would be to use the #6 APIs once we get those.
The text was updated successfully, but these errors were encountered:
#85 landed a while back, which added CString/&CStr
So in total we now have:
BString/&BStr
String/&str
CString/&CStr
The UString/&UStr variant is missing. We can implement that as the C++ wrapper gets support for that. For now the "native C string" is Rust's built-in CString (just a raw zero terminated char* string).
Current plan
https://github.com/Rantanen/intercom-site/blob/master/content/docs/types/strings.md
Legacy thoughts
Currently
String
is converted toBStr
.It might be more sensible to reduce the automation in this sense. Perhaps use the following mappings:
BStr
-BSTR
OsString
-WCHAR*
on Windows,char*
on Linux.String
-char*
everywhere. Essentially beingstd::string
compatible.Eager implement for
AsRef
/From
/etc. onBStr
would be needed for this to be sensible.On Windows
BStr
would be allocated withSysAllocString
while everything else would use theCoTaskMemAlloc
APIs. Not sure what the equivalent on Linux would be, if any. The fallback for both systems would be to use the #6 APIs once we get those.The text was updated successfully, but these errors were encountered: