* As found by Karsten, the reference count was not initialized in

_ReplaceAtPositions(), and _DoCharacterEscape() (we don't need to preserve
  it, though, as it must be 1).
* Factored out an _Alloc() method which is now always called when the private
  data is allocated. It also takes care of correct initialization (and thus
  fixes the above problem).
* This fix finally allows turning on reference counting again, thanks Karsten!
* Minor cleanup, renamed "oldAdr"/"newAdr" to "oldString", resp. "newString".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24348 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-03-10 19:14:05 +00:00
parent 7c58a46830
commit bf4ddb61e1
2 changed files with 78 additions and 69 deletions
+1
View File
@@ -221,6 +221,7 @@ private:
// Management
status_t _Detach();
char* _Alloc(int32 length);
char* _Realloc(int32 length);
void _Init(const char* src, int32 length);
char* _Clone(const char* data, int32 length);