Michael, Stephan,
Stephan Bergmann wrote:
I am not happy with the changes to ustring.c: sal_uInt32 * pInfo,
though poorly of under-specific type, should only transport
RTL_TEXTTOUNICODE_INFO_xxx flags (which have well-defined semantics, see
<http://udk.openoffice.org/cpp/man/spec/textconversion.html>).
Apparently, rtl_string2UString traditionally ignored out-of-memory
conditions and returned nonsense---what a broken mess. However,
misusing pInfo to transport the wrongly-typed
RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR to signal out-of-error
conditions strikes me as odd. (IMO, ideally, at the C++ level, intern
would throw std::bad_alloc for out-of-memory conditions and indicate
conversion problems via the sal_uInt32 * pInfo, or by throwing another
type of exception. Admittedly hard to get that into the sal/rtl mess.)
can we sort this out somehow? I basically see two options, either
- do not report any out-of-memory conditions and (silently) fail, as all
the other sal/osl/rtl functions do, or
- return it differently, by not using pInfo (could be a return value,
success == 0, failure != 0).
IMHO this should be addressed before approving "salstrintern".
Regards
Kay
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]