You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2015/05/09 22:25:58 UTC

[3/5] lucy-clownfish git commit: Purge superficial trappings of Obj from LFReg.

Purge superficial trappings of Obj from LFReg.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/e5b3bf56
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/e5b3bf56
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/e5b3bf56

Branch: refs/heads/master
Commit: e5b3bf5697994bc9078f6c4c2597e1a4966bf4cb
Parents: aaa9029
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Wed May 6 20:46:30 2015 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Wed May 6 20:48:41 2015 -0700

----------------------------------------------------------------------
 runtime/core/Clownfish/LockFreeRegistry.c | 9 +--------
 runtime/core/Clownfish/LockFreeRegistry.h | 4 ----
 2 files changed, 1 insertion(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/e5b3bf56/runtime/core/Clownfish/LockFreeRegistry.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/LockFreeRegistry.c b/runtime/core/Clownfish/LockFreeRegistry.c
index 1e54218..8a7b07f 100644
--- a/runtime/core/Clownfish/LockFreeRegistry.c
+++ b/runtime/core/Clownfish/LockFreeRegistry.c
@@ -25,7 +25,6 @@
 #include "Clownfish/Util/Memory.h"
 
 struct cfish_LockFreeRegistry {
-    CFISH_OBJ_HEAD;
     size_t  capacity;
     void   *entries;
 };
@@ -41,12 +40,6 @@ typedef struct cfish_LFRegEntry {
 LockFreeRegistry*
 LFReg_new(size_t capacity) {
     LockFreeRegistry *self = CALLOCATE(1, sizeof(LockFreeRegistry));
-    Class_Init_Obj(OBJ, self);
-    return LFReg_init(self, capacity);
-}
-
-LockFreeRegistry*
-LFReg_init(LockFreeRegistry *self, size_t capacity) {
     self->capacity = capacity;
     self->entries  = CALLOCATE(capacity, sizeof(void*));
     return self;
@@ -129,7 +122,7 @@ LFReg_destroy(LockFreeRegistry *self) {
     }
     FREEMEM(self->entries);
 
-    Obj_Destroy_IMP((Obj*)self);
+    FREEMEM(self);
 }
 
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/e5b3bf56/runtime/core/Clownfish/LockFreeRegistry.h
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/LockFreeRegistry.h b/runtime/core/Clownfish/LockFreeRegistry.h
index 75c4fed..6bc803e 100644
--- a/runtime/core/Clownfish/LockFreeRegistry.h
+++ b/runtime/core/Clownfish/LockFreeRegistry.h
@@ -25,9 +25,6 @@ typedef struct cfish_LockFreeRegistry cfish_LockFreeRegistry;
 cfish_LockFreeRegistry*
 cfish_LFReg_new(size_t capacity);
 
-cfish_LockFreeRegistry*
-cfish_LFReg_init(cfish_LockFreeRegistry *self, size_t capacity);
-
 void
 cfish_LFReg_destroy(cfish_LockFreeRegistry *self);
 
@@ -41,7 +38,6 @@ cfish_LFReg_fetch(cfish_LockFreeRegistry *self, struct cfish_String *key);
 #ifdef CFISH_USE_SHORT_NAMES
   #define LockFreeRegistry cfish_LockFreeRegistry
   #define LFReg_new        cfish_LFReg_new
-  #define LFReg_init       cfish_LFReg_init
   #define LFReg_destroy    cfish_LFReg_destroy
   #define LFReg_register   cfish_LFReg_register
   #define LFReg_fetch      cfish_LFReg_fetch