Cease sharing Class and LFReg between Perl threads
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/859ee7e1 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/859ee7e1 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/859ee7e1 Branch: refs/heads/clone_class_registry Commit: 859ee7e1b43bed64c8312f6cd4f8d8f43e3ece6d Parents: b46a446 Author: Nick Wellnhofer <[email protected]> Authored: Sun Aug 3 17:36:24 2014 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Sun Aug 3 17:46:02 2014 +0200 ---------------------------------------------------------------------- runtime/c/src/Clownfish/Class.c | 7 ------ runtime/c/src/Clownfish/LockFreeRegistry.c | 32 ------------------------ runtime/core/Clownfish/Class.cfh | 3 --- runtime/core/Clownfish/LockFreeRegistry.cfh | 3 --- runtime/perl/xs/XSBind.c | 26 ------------------- 5 files changed, 71 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/859ee7e1/runtime/c/src/Clownfish/Class.c ---------------------------------------------------------------------- diff --git a/runtime/c/src/Clownfish/Class.c b/runtime/c/src/Clownfish/Class.c index 4c626d9..61aec84 100644 --- a/runtime/c/src/Clownfish/Class.c +++ b/runtime/c/src/Clownfish/Class.c @@ -81,10 +81,3 @@ Class_find_parent_class(String *class_name) { UNREACHABLE_RETURN(String*); } -void* -Class_To_Host_IMP(Class *self) { - UNUSED_VAR(self); - THROW(ERR, "TODO"); - UNREACHABLE_RETURN(void*); -} - http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/859ee7e1/runtime/c/src/Clownfish/LockFreeRegistry.c ---------------------------------------------------------------------- diff --git a/runtime/c/src/Clownfish/LockFreeRegistry.c b/runtime/c/src/Clownfish/LockFreeRegistry.c deleted file mode 100644 index 396b78b..0000000 --- a/runtime/c/src/Clownfish/LockFreeRegistry.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define C_CFISH_LOCKFREEREGISTRY -#define CFISH_USE_SHORT_NAMES - -#include "charmony.h" - -#include "Clownfish/LockFreeRegistry.h" -#include "Clownfish/Err.h" - -void* -LFReg_To_Host_IMP(LockFreeRegistry *self) { - UNUSED_VAR(self); - THROW(ERR, "TODO"); - UNREACHABLE_RETURN(void*); -} - - http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/859ee7e1/runtime/core/Clownfish/Class.cfh ---------------------------------------------------------------------- diff --git a/runtime/core/Clownfish/Class.cfh b/runtime/core/Clownfish/Class.cfh index 4229ff2..968c512 100644 --- a/runtime/core/Clownfish/Class.cfh +++ b/runtime/core/Clownfish/Class.cfh @@ -147,9 +147,6 @@ class Clownfish::Class inherits Clownfish::Obj { uint32_t Get_RefCount(Class *self); - void* - To_Host(Class *self); - public void Destroy(Class *self); } http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/859ee7e1/runtime/core/Clownfish/LockFreeRegistry.cfh ---------------------------------------------------------------------- diff --git a/runtime/core/Clownfish/LockFreeRegistry.cfh b/runtime/core/Clownfish/LockFreeRegistry.cfh index cc8be8e..4defbcf 100644 --- a/runtime/core/Clownfish/LockFreeRegistry.cfh +++ b/runtime/core/Clownfish/LockFreeRegistry.cfh @@ -38,9 +38,6 @@ class Clownfish::LockFreeRegistry nickname LFReg inherits Clownfish::Obj { public incremented LockFreeRegistry* Clone(LockFreeRegistry *self); - void* - To_Host(LockFreeRegistry *self); - public void Destroy(LockFreeRegistry *self); } http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/859ee7e1/runtime/perl/xs/XSBind.c ---------------------------------------------------------------------- diff --git a/runtime/perl/xs/XSBind.c b/runtime/perl/xs/XSBind.c index 8807c86..07ab582 100644 --- a/runtime/perl/xs/XSBind.c +++ b/runtime/perl/xs/XSBind.c @@ -775,18 +775,6 @@ cfish_Class_find_parent_class(cfish_String *class_name) { return parent_class; } -void* -CFISH_Class_To_Host_IMP(cfish_Class *self) { - bool first_time = self->ref.count & XSBIND_REFCOUNT_FLAG ? true : false; - CFISH_Class_To_Host_t to_host - = CFISH_SUPER_METHOD_PTR(CFISH_CLASS, CFISH_Class_To_Host); - SV *host_obj = (SV*)to_host(self); - if (first_time) { - SvSHARE((SV*)self->ref.host_obj); - } - return host_obj; -} - /*************************** Clownfish::Method ******************************/ @@ -964,17 +952,3 @@ cfish_Err_trap(CFISH_Err_Attempt_t routine, void *context) { return error; } -/*********************** Clownfish::LockFreeRegistry ************************/ - -void* -CFISH_LFReg_To_Host_IMP(cfish_LockFreeRegistry *self) { - bool first_time = self->ref.count & XSBIND_REFCOUNT_FLAG ? true : false; - CFISH_LFReg_To_Host_t to_host - = CFISH_SUPER_METHOD_PTR(CFISH_LOCKFREEREGISTRY, CFISH_LFReg_To_Host); - SV *host_obj = (SV*)to_host(self); - if (first_time) { - SvSHARE((SV*)self->ref.host_obj); - } - return host_obj; -} -
