From b0d2693fef082c1ddf665363909c5e7ae0c52357 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 2 Apr 2004 11:33:55 +0000 Subject: String code from Pavol Bosik used by Anjuta. --- src/PropSet.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/PropSet.cxx b/src/PropSet.cxx index 32ec59626..70cd46f88 100644 --- a/src/PropSet.cxx +++ b/src/PropSet.cxx @@ -325,9 +325,18 @@ char *SString::StringAllocate( return sNew; } -// End SString functions - +/** + * Allocate uninitialized memory big enough to fit a string of the given length + * @return the pointer to the new string + */ +char *SString::StringAllocate(lenpos_t len) { + if (len != measure_length) + return new char [len + 1]; + else + return 0; +} +// End SString functions PropSet::PropSet() { superPS = 0; -- cgit v1.2.3