Remove new_from_str StackString constructor It was only used by the old ZombieKeyedHash.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/159ed631 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/159ed631 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/159ed631 Branch: refs/heads/master Commit: 159ed631594efa0d186d783ec93c79c0dbfa1a21 Parents: d4e9fa8 Author: Nick Wellnhofer <[email protected]> Authored: Sat Aug 9 18:24:18 2014 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Sun Apr 26 11:55:39 2015 +0200 ---------------------------------------------------------------------- runtime/core/Clownfish/String.c | 20 -------------------- runtime/core/Clownfish/String.cfh | 9 --------- 2 files changed, 29 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/159ed631/runtime/core/Clownfish/String.c ---------------------------------------------------------------------- diff --git a/runtime/core/Clownfish/String.c b/runtime/core/Clownfish/String.c index 067a0b2..776d708 100644 --- a/runtime/core/Clownfish/String.c +++ b/runtime/core/Clownfish/String.c @@ -530,26 +530,6 @@ Str_StackTail_IMP(String *self, void *allocation) { /*****************************************************************/ StackString* -SStr_new_from_str(void *allocation, size_t alloc_size, String *string) { - size_t size = string->size; - char *ptr = ((char*)allocation) + sizeof(StackString); - - if (alloc_size < sizeof(StackString) + size + 1) { - THROW(ERR, "alloc_size of StackString too small"); - UNREACHABLE_RETURN(StackString*); - } - - memcpy(ptr, string->ptr, size); - ptr[size] = '\0'; - - StackString *self = (StackString*)Class_Init_Obj(STACKSTRING, allocation); - self->ptr = ptr; - self->size = size; - self->origin = NULL; - return self; -} - -StackString* SStr_wrap_utf8(void *allocation, const char *ptr, size_t size) { StackString *self = (StackString*)Class_Init_Obj(STACKSTRING, allocation); http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/159ed631/runtime/core/Clownfish/String.cfh ---------------------------------------------------------------------- diff --git a/runtime/core/Clownfish/String.cfh b/runtime/core/Clownfish/String.cfh index 5ad84c9..b797c40 100644 --- a/runtime/core/Clownfish/String.cfh +++ b/runtime/core/Clownfish/String.cfh @@ -285,15 +285,6 @@ class Clownfish::String nickname Str class Clownfish::StackString nickname SStr inherits Clownfish::String { - /** - * @param allocation A single block of memory which will be used for both - * the StackString object and its buffer. - * @param alloc_size The size of the allocation. - * @param string String to be copied. - */ - inert incremented StackString* - new_from_str(void *allocation, size_t alloc_size, String *string); - inert incremented StackString* wrap(void *allocation, String *source);
