You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2013/09/19 12:15:55 UTC
[lucy-commits] git commit: refs/heads/cfish-string-prep1 - Call malloc directly in
Str_To_Utf8
Updated Branches:
refs/heads/cfish-string-prep1 80b15686a -> eb309582b
Call malloc directly in Str_To_Utf8
This avoids surprises if MALLOCATE is ever changed.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/eb309582
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/eb309582
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/eb309582
Branch: refs/heads/cfish-string-prep1
Commit: eb309582b564558f84d03046aedd4871077e05d6
Parents: 80b1568
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Thu Sep 19 12:12:32 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Thu Sep 19 12:12:32 2013 +0200
----------------------------------------------------------------------
clownfish/runtime/core/Clownfish/String.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/eb309582/clownfish/runtime/core/Clownfish/String.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/String.c b/clownfish/runtime/core/Clownfish/String.c
index e9b0936..8747ab3 100644
--- a/clownfish/runtime/core/Clownfish/String.c
+++ b/clownfish/runtime/core/Clownfish/String.c
@@ -297,7 +297,7 @@ Str_To_F64_IMP(String *self) {
char*
Str_To_Utf8_IMP(String *self) {
- char *buf = (char*)MALLOCATE(self->size + 1);
+ char *buf = (char*)malloc(self->size + 1);
memcpy(buf, self->ptr, self->size);
buf[self->size] = '\0'; // NULL-terminate.
return buf;