Stephan Bergmann wrote:
Michael, all,

I have a combined list of comments on the various issues in CWS salstrintern, thus posting it here instead of one of the issues.

Another weird idea I just had for RTL_CONSTASCII_USTRINGPARAM: Instead of a compound literal, use a literal wide string to encode a complete rtl_uString. That does not rely on the non-standard-C++ compound literal, and probably leads to duplicate removal on gcc. Alas, it is not easy to get the length field into the string:

#if defined OSL_BIGENDIAN
#define LEN_1 L"\0\0\0\0"
#define LEN_2 L"\0\0\0\0x1"
#define LEN_3 L"\0\0\0\0x2"
...
#else /* OSL_LITENDIAN */
...
#endif
#define RTL_CONSTASCII_USTRINGPARAM(s) \
  (rtl_uString const *) (LEN_0x8002/*refCount*/ LEN_##sizeof(s) L##s)

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to