lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [27/50] [abbrv] git commit: refs/heads/master - Call malloc directly in Str_To_Utf8
Date Fri, 11 Oct 2013 13:32:05 GMT
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/6bc95d59
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/6bc95d59
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/6bc95d59

Branch: refs/heads/master
Commit: 6bc95d59221b0fe4070bc39bef8aeccc514d695b
Parents: ee295df
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Thu Sep 19 12:12:32 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Fri Oct 11 15:28:18 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/6bc95d59/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;


Mime
View raw message