lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [1/3] Rename Clownfish::VTable to Clownfish::Class
Date Sun, 06 Jul 2014 13:46:31 GMT
Repository: lucy
Updated Branches:
  refs/heads/rename-vtable [created] b1975f5d1


http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/Lucy/Test/Store/TestRAMFileHandle.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Store/TestRAMFileHandle.c b/core/Lucy/Test/Store/TestRAMFileHandle.c
index d276d5d..e208784 100644
--- a/core/Lucy/Test/Store/TestRAMFileHandle.c
+++ b/core/Lucy/Test/Store/TestRAMFileHandle.c
@@ -31,7 +31,7 @@
 
 TestRAMFileHandle*
 TestRAMFH_new() {
-    return (TestRAMFileHandle*)VTable_Make_Obj(TESTRAMFILEHANDLE);
+    return (TestRAMFileHandle*)Class_Make_Obj(TESTRAMFILEHANDLE);
 }
 
 static void

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/Lucy/Test/Store/TestRAMFolder.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Store/TestRAMFolder.c b/core/Lucy/Test/Store/TestRAMFolder.c
index c173897..01b9f8f 100644
--- a/core/Lucy/Test/Store/TestRAMFolder.c
+++ b/core/Lucy/Test/Store/TestRAMFolder.c
@@ -41,7 +41,7 @@ static String *nope_nyet     = NULL;
 
 TestRAMFolder*
 TestRAMFolder_new() {
-    return (TestRAMFolder*)VTable_Make_Obj(TESTRAMFOLDER);
+    return (TestRAMFolder*)Class_Make_Obj(TESTRAMFOLDER);
 }
 
 static void

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/Lucy/Test/TestSchema.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/TestSchema.c b/core/Lucy/Test/TestSchema.c
index 7983c9b..b7b65b6 100644
--- a/core/Lucy/Test/TestSchema.c
+++ b/core/Lucy/Test/TestSchema.c
@@ -29,7 +29,7 @@
 
 TestSchema*
 TestSchema_new(bool use_alt_arch) {
-    TestSchema *self = (TestSchema*)VTable_Make_Obj(TESTSCHEMA);
+    TestSchema *self = (TestSchema*)Class_Make_Obj(TESTSCHEMA);
     return TestSchema_init(self, use_alt_arch);
 }
 
@@ -62,7 +62,7 @@ TestSchema_Architecture_IMP(TestSchema *self) {
 
 TestBatchSchema*
 TestBatchSchema_new() {
-    return (TestBatchSchema*)VTable_Make_Obj(TESTBATCHSCHEMA);
+    return (TestBatchSchema*)Class_Make_Obj(TESTBATCHSCHEMA);
 }
 
 static void

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/Lucy/Test/Util/TestFreezer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestFreezer.c b/core/Lucy/Test/Util/TestFreezer.c
index 5b44e17..9c0df3b 100644
--- a/core/Lucy/Test/Util/TestFreezer.c
+++ b/core/Lucy/Test/Util/TestFreezer.c
@@ -28,7 +28,7 @@
 
 TestFreezer*
 TestFreezer_new() {
-    return (TestFreezer*)VTable_Make_Obj(TESTFREEZER);
+    return (TestFreezer*)Class_Make_Obj(TESTFREEZER);
 }
 
 // Return the result of round-tripping the object through FREEZE and THAW.

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/Lucy/Test/Util/TestIndexFileNames.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestIndexFileNames.c b/core/Lucy/Test/Util/TestIndexFileNames.c
index 5e51db8..6b6395d 100644
--- a/core/Lucy/Test/Util/TestIndexFileNames.c
+++ b/core/Lucy/Test/Util/TestIndexFileNames.c
@@ -24,7 +24,7 @@
 
 TestIndexFileNames*
 TestIxFileNames_new() {
-    return (TestIndexFileNames*)VTable_Make_Obj(TESTINDEXFILENAMES);
+    return (TestIndexFileNames*)Class_Make_Obj(TESTINDEXFILENAMES);
 }
 
 static void

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/Lucy/Test/Util/TestJson.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestJson.c b/core/Lucy/Test/Util/TestJson.c
index 367b0e3..9b8d4ed 100644
--- a/core/Lucy/Test/Util/TestJson.c
+++ b/core/Lucy/Test/Util/TestJson.c
@@ -27,7 +27,7 @@
 
 TestJson*
 TestJson_new() {
-    return (TestJson*)VTable_Make_Obj(TESTJSON);
+    return (TestJson*)Class_Make_Obj(TESTJSON);
 }
 
 // Create a test data structure including at least one each of Hash, VArray,

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/Lucy/Test/Util/TestMemoryPool.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestMemoryPool.c b/core/Lucy/Test/Util/TestMemoryPool.c
index 30199df..02b2ac7 100644
--- a/core/Lucy/Test/Util/TestMemoryPool.c
+++ b/core/Lucy/Test/Util/TestMemoryPool.c
@@ -26,7 +26,7 @@
 
 TestMemoryPool*
 TestMemPool_new() {
-    return (TestMemoryPool*)VTable_Make_Obj(TESTMEMORYPOOL);
+    return (TestMemoryPool*)Class_Make_Obj(TESTMEMORYPOOL);
 }
 
 void

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/Lucy/Test/Util/TestPriorityQueue.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestPriorityQueue.c b/core/Lucy/Test/Util/TestPriorityQueue.c
index a4479e3..aa9ec57 100644
--- a/core/Lucy/Test/Util/TestPriorityQueue.c
+++ b/core/Lucy/Test/Util/TestPriorityQueue.c
@@ -25,13 +25,13 @@
 
 TestPriorityQueue*
 TestPriQ_new() {
-    return (TestPriorityQueue*)VTable_Make_Obj(TESTPRIORITYQUEUE);
+    return (TestPriorityQueue*)Class_Make_Obj(TESTPRIORITYQUEUE);
 }
 
 NumPriorityQueue*
 NumPriQ_new(uint32_t max_size) {
     NumPriorityQueue *self
-        = (NumPriorityQueue*)VTable_Make_Obj(NUMPRIORITYQUEUE);
+        = (NumPriorityQueue*)Class_Make_Obj(NUMPRIORITYQUEUE);
     return (NumPriorityQueue*)PriQ_init((PriorityQueue*)self, max_size);
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/Lucy/Test/Util/TestSortExternal.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestSortExternal.c b/core/Lucy/Test/Util/TestSortExternal.c
index 19e83cf..e14de9c 100644
--- a/core/Lucy/Test/Util/TestSortExternal.c
+++ b/core/Lucy/Test/Util/TestSortExternal.c
@@ -36,7 +36,7 @@ static ByteBuf *z_bb;
 
 TestSortExternal*
 TestSortExternal_new() {
-    return (TestSortExternal*)VTable_Make_Obj(TESTSORTEXTERNAL);
+    return (TestSortExternal*)Class_Make_Obj(TESTSORTEXTERNAL);
 }
 
 static void

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/Lucy/Util/BBSortEx.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/BBSortEx.c b/core/Lucy/Util/BBSortEx.c
index 66e0568..ef1cd91 100644
--- a/core/Lucy/Util/BBSortEx.c
+++ b/core/Lucy/Util/BBSortEx.c
@@ -27,7 +27,7 @@
 
 BBSortEx*
 BBSortEx_new(uint32_t mem_threshold, VArray *external) {
-    BBSortEx *self = (BBSortEx*)VTable_Make_Obj(BBSORTEX);
+    BBSortEx *self = (BBSortEx*)Class_Make_Obj(BBSORTEX);
     return BBSortEx_init(self, mem_threshold, external);
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/Lucy/Util/Freezer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/Freezer.c b/core/Lucy/Util/Freezer.c
index 16e37c8..3d3d923 100644
--- a/core/Lucy/Util/Freezer.c
+++ b/core/Lucy/Util/Freezer.c
@@ -42,8 +42,8 @@ Freezer_freeze(Obj *obj, OutStream *outstream) {
 Obj*
 Freezer_thaw(InStream *instream) {
     String *class_name = Freezer_read_string(instream);
-    VTable *vtable = VTable_singleton(class_name, NULL);
-    Obj *blank = VTable_Make_Obj(vtable);
+    Class *klass = Class_singleton(class_name, NULL);
+    Obj *blank = Class_Make_Obj(klass);
     DECREF(class_name);
     return Freezer_deserialize(blank, instream);
 }
@@ -227,7 +227,7 @@ Freezer_deserialize_string(String *string, InStream *instream) {
 
 String*
 Freezer_read_string(InStream *instream) {
-    String *string = (String*)VTable_Make_Obj(STRING);
+    String *string = (String*)Class_Make_Obj(STRING);
     return Freezer_deserialize_string(string, instream);
 }
 
@@ -248,7 +248,7 @@ Freezer_deserialize_bytebuf(ByteBuf *bytebuf, InStream *instream) {
 
 ByteBuf*
 Freezer_read_bytebuf(InStream *instream) {
-    ByteBuf *bytebuf = (ByteBuf*)VTable_Make_Obj(BYTEBUF);
+    ByteBuf *bytebuf = (ByteBuf*)Class_Make_Obj(BYTEBUF);
     return Freezer_deserialize_bytebuf(bytebuf, instream);
 }
 
@@ -286,7 +286,7 @@ Freezer_deserialize_varray(VArray *array, InStream *instream) {
 
 VArray*
 Freezer_read_varray(InStream *instream) {
-    VArray *array = (VArray*)VTable_Make_Obj(VARRAY);
+    VArray *array = (VArray*)Class_Make_Obj(VARRAY);
     return Freezer_deserialize_varray(array, instream);
 }
 
@@ -355,7 +355,7 @@ Freezer_deserialize_hash(Hash *hash, InStream *instream) {
 
 Hash*
 Freezer_read_hash(InStream *instream) {
-    Hash *hash = (Hash*)VTable_Make_Obj(HASH);
+    Hash *hash = (Hash*)Class_Make_Obj(HASH);
     return Freezer_deserialize_hash(hash, instream);
 }
 
@@ -423,8 +423,8 @@ Freezer_dump(Obj *obj) {
 }
 
 static Obj*
-S_load_via_load_method(VTable *vtable, Obj *dump) {
-    Obj *dummy = VTable_Make_Obj(vtable);
+S_load_via_load_method(Class *klass, Obj *dump) {
+    Obj *dummy = Class_Make_Obj(klass);
     Obj *loaded = NULL;
     if (Obj_Is_A(dummy, ANALYZER)) {
         loaded = Analyzer_Load((Analyzer*)dummy, dump);
@@ -446,7 +446,7 @@ S_load_via_load_method(VTable *vtable, Obj *dump) {
     }
     else {
         DECREF(dummy);
-        THROW(ERR, "Don't know how to load '%o'", VTable_Get_Name(vtable));
+        THROW(ERR, "Don't know how to load '%o'", Class_Get_Name(klass));
     }
 
     DECREF(dummy);
@@ -460,14 +460,14 @@ S_load_from_hash(Hash *dump) {
     // Assume that the presence of the "_class" key paired with a valid class
     // name indicates the output of a dump() rather than an ordinary Hash.
     if (class_name && Str_Is_A(class_name, STRING)) {
-        VTable *vtable = VTable_fetch_vtable(class_name);
-
-        if (!vtable) {
-            String *parent_class = VTable_find_parent_class(class_name);
-            if (parent_class) {
-                VTable *parent = VTable_singleton(parent_class, NULL);
-                vtable = VTable_singleton(class_name, parent);
-                DECREF(parent_class);
+        Class *klass = Class_fetch_class(class_name);
+
+        if (!klass) {
+            String *parent_class_name = Class_find_parent_class(class_name);
+            if (parent_class_name) {
+                Class *parent = Class_singleton(parent_class_name, NULL);
+                klass = Class_singleton(class_name, parent);
+                DECREF(parent_class_name);
             }
             else {
                 // TODO: Fix load() so that it works with ordinary hash keys
@@ -477,8 +477,8 @@ S_load_from_hash(Hash *dump) {
         }
 
         // Dispatch to an alternate Load() method.
-        if (vtable) {
-            return S_load_via_load_method(vtable, (Obj*)dump);
+        if (klass) {
+            return S_load_via_load_method(klass, (Obj*)dump);
         }
 
     }

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/Lucy/Util/MemoryPool.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/MemoryPool.c b/core/Lucy/Util/MemoryPool.c
index 862fefb..0d79b84 100644
--- a/core/Lucy/Util/MemoryPool.c
+++ b/core/Lucy/Util/MemoryPool.c
@@ -36,7 +36,7 @@ S_init_arena(MemoryPool *self, MemoryPoolIVARS *ivars, size_t amount);
 
 MemoryPool*
 MemPool_new(uint32_t arena_size) {
-    MemoryPool *self = (MemoryPool*)VTable_Make_Obj(MEMORYPOOL);
+    MemoryPool *self = (MemoryPool*)Class_Make_Obj(MEMORYPOOL);
     return MemPool_init(self, arena_size);
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/Lucy/Util/SortExternal.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/SortExternal.c b/core/Lucy/Util/SortExternal.c
index c8b6963..b14ac80 100644
--- a/core/Lucy/Util/SortExternal.c
+++ b/core/Lucy/Util/SortExternal.c
@@ -133,9 +133,9 @@ SortEx_Sort_Buffer_IMP(SortExternal *self) {
         THROW(ERR, "Cant Sort_Buffer() after fetching %u32 items", ivars->buf_tick);
     }
     if (ivars->buf_max != 0) {
-        VTable *vtable = SortEx_Get_VTable(self);
+        Class *klass = SortEx_Get_Class(self);
         CFISH_Sort_Compare_t compare
-            = (CFISH_Sort_Compare_t)METHOD_PTR(vtable, LUCY_SortEx_Compare);
+            = (CFISH_Sort_Compare_t)METHOD_PTR(klass, LUCY_SortEx_Compare);
         if (ivars->scratch_cap < ivars->buf_cap) {
             ivars->scratch_cap = ivars->buf_cap;
             ivars->scratch
@@ -259,9 +259,9 @@ S_absorb_slices(SortExternal *self, SortExternalIVARS *ivars,
     uint32_t    num_runs     = VA_Get_Size(ivars->runs);
     Obj      ***slice_starts = ivars->slice_starts;
     uint32_t   *slice_sizes  = ivars->slice_sizes;
-    VTable     *vtable       = SortEx_Get_VTable(self);
+    Class      *klass        = SortEx_Get_Class(self);
     CFISH_Sort_Compare_t compare
-        = (CFISH_Sort_Compare_t)METHOD_PTR(vtable, LUCY_SortEx_Compare);
+        = (CFISH_Sort_Compare_t)METHOD_PTR(klass, LUCY_SortEx_Compare);
 
     if (ivars->buf_max != 0) { THROW(ERR, "Can't refill unless empty"); }
 
@@ -353,7 +353,7 @@ S_find_slice_size(SortExternal *self, SortExternalIVARS *ivars,
     int32_t          hi      = ivars->buf_max;
     Obj            **buffer  = ivars->buffer;
     SortEx_Compare_t compare
-        = METHOD_PTR(SortEx_Get_VTable(self), LUCY_SortEx_Compare);
+        = METHOD_PTR(SortEx_Get_Class(self), LUCY_SortEx_Compare);
 
     // Binary search.
     while (hi - lo > 1) {

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/Lucy/Util/ToolSet.h
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/ToolSet.h b/core/Lucy/Util/ToolSet.h
index ce4c21d..8e18190 100644
--- a/core/Lucy/Util/ToolSet.h
+++ b/core/Lucy/Util/ToolSet.h
@@ -46,7 +46,7 @@ extern "C" {
 #include "Lucy/Object/I32Array.h"
 #include "Clownfish/Num.h"
 #include "Clownfish/VArray.h"
-#include "Clownfish/VTable.h"
+#include "Clownfish/Class.h"
 #include "Clownfish/Util/NumberUtils.h"
 #include "Clownfish/Util/Memory.h"
 #include "Clownfish/Util/StringHelper.h"

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/LucyX/Search/FilterMatcher.c
----------------------------------------------------------------------
diff --git a/core/LucyX/Search/FilterMatcher.c b/core/LucyX/Search/FilterMatcher.c
index 0de0c89..c187ee0 100644
--- a/core/LucyX/Search/FilterMatcher.c
+++ b/core/LucyX/Search/FilterMatcher.c
@@ -21,7 +21,7 @@
 
 FilterMatcher*
 FilterMatcher_new(BitVector *bits, int32_t doc_max) {
-    FilterMatcher *self = (FilterMatcher*)VTable_Make_Obj(FILTERMATCHER);
+    FilterMatcher *self = (FilterMatcher*)Class_Make_Obj(FILTERMATCHER);
     return FilterMatcher_init(self, bits, doc_max);
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/LucyX/Search/MockMatcher.c
----------------------------------------------------------------------
diff --git a/core/LucyX/Search/MockMatcher.c b/core/LucyX/Search/MockMatcher.c
index dffb664..e340e78 100644
--- a/core/LucyX/Search/MockMatcher.c
+++ b/core/LucyX/Search/MockMatcher.c
@@ -21,7 +21,7 @@
 
 MockMatcher*
 MockMatcher_new(I32Array *doc_ids, ByteBuf *scores) {
-    MockMatcher *self = (MockMatcher*)VTable_Make_Obj(MOCKMATCHER);
+    MockMatcher *self = (MockMatcher*)Class_Make_Obj(MOCKMATCHER);
     return MockMatcher_init(self, doc_ids, scores);
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/LucyX/Search/ProximityMatcher.c
----------------------------------------------------------------------
diff --git a/core/LucyX/Search/ProximityMatcher.c b/core/LucyX/Search/ProximityMatcher.c
index 8152df3..8ccf1d9 100644
--- a/core/LucyX/Search/ProximityMatcher.c
+++ b/core/LucyX/Search/ProximityMatcher.c
@@ -30,7 +30,7 @@ ProximityMatcher*
 ProximityMatcher_new(Similarity *sim, VArray *plists, Compiler *compiler,
                      uint32_t within) {
     ProximityMatcher *self =
-        (ProximityMatcher*)VTable_Make_Obj(PROXIMITYMATCHER);
+        (ProximityMatcher*)Class_Make_Obj(PROXIMITYMATCHER);
     return ProximityMatcher_init(self, sim, plists, compiler, within);
 
 }

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/core/LucyX/Search/ProximityQuery.c
----------------------------------------------------------------------
diff --git a/core/LucyX/Search/ProximityQuery.c b/core/LucyX/Search/ProximityQuery.c
index c4b779f..8a3fbe7 100644
--- a/core/LucyX/Search/ProximityQuery.c
+++ b/core/LucyX/Search/ProximityQuery.c
@@ -48,7 +48,7 @@ S_do_init(ProximityQuery *self, String *field, VArray *terms, float boost,
 
 ProximityQuery*
 ProximityQuery_new(String *field, VArray *terms, uint32_t within) {
-    ProximityQuery *self = (ProximityQuery*)VTable_Make_Obj(PROXIMITYQUERY);
+    ProximityQuery *self = (ProximityQuery*)Class_Make_Obj(PROXIMITYQUERY);
     return ProximityQuery_init(self, field, terms, within);
 }
 
@@ -214,7 +214,7 @@ ProximityCompiler*
 ProximityCompiler_new(ProximityQuery *parent, Searcher *searcher, float boost,
                       uint32_t within) {
     ProximityCompiler *self =
-        (ProximityCompiler*)VTable_Make_Obj(PROXIMITYCOMPILER);
+        (ProximityCompiler*)Class_Make_Obj(PROXIMITYCOMPILER);
     return ProximityCompiler_init(self, parent, searcher, boost, within);
 }
 
@@ -343,7 +343,7 @@ ProximityCompiler_Make_Matcher_IMP(ProximityCompiler *self, SegReader
*reader,
     // Bail if there's no PostingListReader for this segment.
     PostingListReader *const plist_reader
         = (PostingListReader*)SegReader_Fetch(
-              reader, VTable_Get_Name(POSTINGLISTREADER));
+              reader, Class_Get_Name(POSTINGLISTREADER));
     if (!plist_reader) { return NULL; }
 
     // Look up each term.

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/perl/buildlib/Lucy/Build/Binding/Index.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build/Binding/Index.pm b/perl/buildlib/Lucy/Build/Binding/Index.pm
index b02f299..617fc59 100644
--- a/perl/buildlib/Lucy/Build/Binding/Index.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Index.pm
@@ -499,7 +499,7 @@ PPCODE:
     }
     if (!doc) {
         THROW(CFISH_ERR, "Need either a hashref or a %o",
-              CFISH_VTable_Get_Name(LUCY_DOC));
+              CFISH_Class_Get_Name(LUCY_DOC));
     }
 
     LUCY_Indexer_Add_Doc(self, doc, boost);

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/perl/buildlib/Lucy/Build/Binding/Misc.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build/Binding/Misc.pm b/perl/buildlib/Lucy/Build/Binding/Misc.pm
index 09dc616..427aa4f 100644
--- a/perl/buildlib/Lucy/Build/Binding/Misc.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Misc.pm
@@ -35,9 +35,9 @@ sub inherit_metadata {
         next if $class->get_parcel->get_name ne 'Clownfish' || $class->inert;
 
         my $class_name = $class->get_class_name;
-        my $vtable     = Clownfish::VTable->fetch_vtable($class_name);
+        my $rt_class   = Clownfish::Class->fetch_class($class_name);
 
-        for my $rt_method (@{ $vtable->get_methods }) {
+        for my $rt_method (@{ $rt_class->get_methods }) {
             if ($rt_method->is_excluded_from_host) {
                 my $method = $class->method($rt_method->get_name);
                 $method->exclude_from_host;
@@ -140,10 +140,10 @@ STORABLE_thaw(blank_obj, cloning, serialized_sv)
 PPCODE:
 {
     char *class_name = HvNAME(SvSTASH(SvRV(blank_obj)));
-    cfish_StackString *klass
+    cfish_StackString *class_name_str
         = CFISH_SSTR_WRAP_UTF8(class_name, strlen(class_name));
-    cfish_VTable *vtable
-        = (cfish_VTable*)cfish_VTable_singleton((cfish_String*)klass, NULL);
+    cfish_Class *klass
+        = cfish_Class_singleton((cfish_String*)class_name_str, NULL);
     STRLEN len;
     char *ptr = SvPV(serialized_sv, len);
     cfish_ViewByteBuf *contents = cfish_ViewBB_new(ptr, len);
@@ -151,7 +151,7 @@ PPCODE:
     lucy_RAMFileHandle *file_handle
         = lucy_RAMFH_open(NULL, LUCY_FH_READ_ONLY, ram_file);
     lucy_InStream *instream = lucy_InStream_open((cfish_Obj*)file_handle);
-    cfish_Obj *self = CFISH_VTable_Foster_Obj(vtable, blank_obj);
+    cfish_Obj *self = CFISH_Class_Foster_Obj(klass, blank_obj);
     cfish_Obj *deserialized = lucy_Freezer_deserialize(self, instream);
 
     CFISH_UNUSED_VAR(cloning);

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/perl/t/026-serialization.t
----------------------------------------------------------------------
diff --git a/perl/t/026-serialization.t b/perl/t/026-serialization.t
index 5fd6c7c..911ca05 100644
--- a/perl/t/026-serialization.t
+++ b/perl/t/026-serialization.t
@@ -84,7 +84,7 @@ SKIP: {
 sub run_test_cycle {
     my ( $orig, $transform ) = @_;
     my $class = ref($orig);
-    my $vtable = $orig->get_vtable;
+    my $cf_class = $orig->get_class;
 
     my $frozen = freeze($orig);
     my $thawed = thaw($frozen);
@@ -99,7 +99,7 @@ sub run_test_cycle {
     $outstream->close;
     my $instream = Lucy::Store::InStream->open( file => $ram_file )
         or confess Clownfish->error;
-    my $deserialized = $vtable->make_obj->deserialize($instream);
+    my $deserialized = $cf_class->make_obj->deserialize($instream);
 
     is( $transform->($deserialized),
         $transform->($orig), "$class: call deserialize via class name" );

http://git-wip-us.apache.org/repos/asf/lucy/blob/b1975f5d/perl/xs/Lucy/Document/Doc.c
----------------------------------------------------------------------
diff --git a/perl/xs/Lucy/Document/Doc.c b/perl/xs/Lucy/Document/Doc.c
index a46da38..987f293 100644
--- a/perl/xs/Lucy/Document/Doc.c
+++ b/perl/xs/Lucy/Document/Doc.c
@@ -193,8 +193,8 @@ LUCY_Doc_Load_IMP(lucy_Doc *self, cfish_Obj *dump) {
     cfish_String *class_name = (cfish_String*)CFISH_CERTIFY(
                                    CFISH_Hash_Fetch_Utf8(source, "_class", 6),
                                    CFISH_STRING);
-    cfish_VTable *vtable = cfish_VTable_singleton(class_name, NULL);
-    lucy_Doc *loaded = (lucy_Doc*)CFISH_VTable_Make_Obj(vtable);
+    cfish_Class *klass = cfish_Class_singleton(class_name, NULL);
+    lucy_Doc *loaded = (lucy_Doc*)CFISH_Class_Make_Obj(klass);
     cfish_Obj *doc_id = CFISH_CERTIFY(
                            CFISH_Hash_Fetch_Utf8(source, "doc_id", 7),
                            CFISH_OBJ);


Mime
View raw message