Make String#Clone create a new String object In order to allow thread-safe cloning of strings, String#Clone must create a new String object.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/a360af7d Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/a360af7d Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/a360af7d Branch: refs/heads/clone_class_registry Commit: a360af7d27a1d528efaf6b8655b386aeb19de307 Parents: 9eb42ea Author: Nick Wellnhofer <[email protected]> Authored: Sun Aug 3 14:07:22 2014 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Sun Aug 3 17:38:04 2014 +0200 ---------------------------------------------------------------------- runtime/core/Clownfish/String.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/a360af7d/runtime/core/Clownfish/String.c ---------------------------------------------------------------------- diff --git a/runtime/core/Clownfish/String.c b/runtime/core/Clownfish/String.c index c23314c..7527f48 100644 --- a/runtime/core/Clownfish/String.c +++ b/runtime/core/Clownfish/String.c @@ -310,7 +310,7 @@ Str_To_Utf8_IMP(String *self) { String* Str_Clone_IMP(String *self) { - return (String*)INCREF(self); + return Str_new_from_trusted_utf8(self->ptr, self->size); } String*
