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.

sal/inc/rtl/string.hxx:1.21.94.1:
- Why new OString(rtl_String*,__sal_NoAcquire)?
- Should have "@since UDK 3.2.7" (if it goes into OOo 2.3, see <http://wiki.services.openoffice.org/wiki/UNO_%40since_Tags>).

sal/inc/rtl/ustring.h:1.17.94.2:
- RTL_CONSTASCII_USTRINGPARAM documentation should be changed to state that it expands to an argument list suitable for a call to exactly one of the rtl::OUString constructors.
- Why #ifdef __GNUC__ and not let the compiler bark if not C99?
- Why /* ... look away ... */?
- Why RTL_CONSTASCII_USTRINGPARAM_STR indirection? Should be documented @internal. - At least for C++, the type definition within the compound literal expression within the cast expression in RTL_CONSTASCII_USTRINGPARAM is dubious, as C++ requires that no types are defined in cast expressions (a C++ template could be used instead).
- rtl_uString_intern has a bad second documentation block.
- rtl_uString_intern[Convert] should have "@since UDK 3.2.7" (if it goes into OOo 2.3, see <http://wiki.services.openoffice.org/wiki/UNO_%40since_Tags>). - rtl_uString_internConvert should signal an error if conversion fails (RTL_TEXTTOUNICODE_FLAGS_xxx_ERROR).
- rtl_uString_internConvert does not document its convertFlags.
- rtl_uString_intern[Convert] return void but have a @return documentation.

sal/inc/rtl/ustring.hxx:1.27.52.2:
- The new functions should have "@since UDK 3.2.7" (if it goes into OOo 2.3, see <http://wiki.services.openoffice.org/wiki/UNO_%40since_Tags>). - intern[Ascii] should signal an error if conversion fails (RTL_TEXTTOUNICODE_FLAGS_xxx_ERROR).
- internAscii is not documented.
- internAscii calls intern with unsupported/undocumented length = -1.

sal/rtl/source/hash.c:1.1.2.2:
- Why roll your own instead of using something like C++ hash_map (and changing hash.c ->hash.cxx)?

sal/rtl/source/strimp.h:
- SAL_INTERLOCK_BITS (sizeof(oslInterlockedCount)*8) instead of (sizeof(sal_Int32)*8), the type of refCount, got me confused.

sal/rtl/source/string.c:1.15.52.1:
- Why is the refCount SAL_STRING_STATIC_FLAG|1 instead of just SAL_STRING_STATIC_FLAG?

sal/rtl/source/ustring.c:1.24.38.3:
- Why is the refCount SAL_STRING_STATIC_FLAG|1 instead of just SAL_STRING_STATIC_FLAG?
- sal_Bool might be better than int CAN[NOT]_RETURN.
- Why SAL_STRING_INTERN_FLAG? Why not change rtl_uString_intern_internal so that it works correctly on already interned strings. - The position of the first OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER in getInternalMutex is wrong. Any potential memory writes in osl_createMutex must be moved before the barrier, only the memory write to pPoolGuard must be after the barrier.

sal/util/sal.map:1.57.78.1:
- rtl_uString_intern, rtl_uString_internConvert must go into a new section UDK_3.6 (inheriting UDK_3.4), and please use 8 spaces instead of a tab in front of them.

-Stephan

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

Reply via email to