summaryrefslogtreecommitdiffstats
path: root/sal/rtl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-12-05 00:37:01 +0100
committerLuboš Luňák <l.lunak@suse.cz>2012-12-06 13:35:18 +0100
commit81e16cea9a11185c209894973db8d1990fa9cce6 (patch)
tree6b784ddae1e873ba282ca1a961a8dc4a32f83e16 /sal/rtl
parentacquire on the shared empty string does nothing (diff)
downloadcore-81e16cea9a11185c209894973db8d1990fa9cce6.tar.gz
core-81e16cea9a11185c209894973db8d1990fa9cce6.zip
mvoe rtl_(u)string_alloc to sal
No point in hidding something useful like this in some helper lib. Change-Id: I7332d7f6bd428378cd19e7e95ad130771a541140
Diffstat (limited to 'sal/rtl')
-rw-r--r--sal/rtl/source/strtmpl.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/sal/rtl/source/strtmpl.cxx b/sal/rtl/source/strtmpl.cxx
index ffe12adf0d71..f715a581e2ce 100644
--- a/sal/rtl/source/strtmpl.cxx
+++ b/sal/rtl/source/strtmpl.cxx
@@ -1066,6 +1066,17 @@ void SAL_CALL IMPL_RTL_STRINGNAME( new )( IMPL_RTL_STRINGDATA** ppThis )
/* ----------------------------------------------------------------------- */
+IMPL_RTL_STRINGDATA* SAL_CALL IMPL_RTL_STRINGNAME( alloc )( sal_Int32 nLen )
+ SAL_THROW_EXTERN_C()
+{
+ if ( nLen <= 0 )
+ return (IMPL_RTL_STRINGDATA*) (&IMPL_RTL_EMPTYSTRING);
+ else
+ return IMPL_RTL_STRINGNAME( ImplAlloc )( nLen );
+}
+
+/* ----------------------------------------------------------------------- */
+
void SAL_CALL IMPL_RTL_STRINGNAME( new_WithLength )( IMPL_RTL_STRINGDATA** ppThis, sal_Int32 nLen )
SAL_THROW_EXTERN_C()
{