Author: marvin
Date: Sun Jul 22 15:12:07 2012
New Revision: 1364322
URL: http://svn.apache.org/viewvc?rev=1364322&view=rev
Log:
LUCY-242 Move Hash under Clownfish.
Added:
lucy/trunk/core/Clownfish/Hash.c
- copied, changed from r1364278, lucy/trunk/core/Lucy/Object/Hash.c
lucy/trunk/core/Clownfish/Hash.cfh
- copied, changed from r1364277, lucy/trunk/core/Lucy/Object/Hash.cfh
lucy/trunk/perl/lib/Clownfish/Hash.pm
- copied, changed from r1364277, lucy/trunk/perl/lib/Lucy/Object/Hash.pm
Removed:
lucy/trunk/core/Lucy/Object/Hash.c
lucy/trunk/core/Lucy/Object/Hash.cfh
lucy/trunk/perl/lib/Lucy/Object/Hash.pm
Modified:
lucy/trunk/c/src/CFBind.h
lucy/trunk/core/Clownfish/VTable.c
lucy/trunk/core/Lucy.c
lucy/trunk/core/Lucy/Analysis/SnowballStopFilter.cfh
lucy/trunk/core/Lucy/Index/ZombieKeyedHash.cfh
lucy/trunk/core/Lucy/Object/Obj.c
lucy/trunk/core/Lucy/Test/Object/TestHash.c
lucy/trunk/core/Lucy/Util/Json/JsonParser.y
lucy/trunk/core/Lucy/Util/ToolSet.h
lucy/trunk/example-lang/src/CFBind.h
lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm
lucy/trunk/perl/lib/Lucy.pm
lucy/trunk/perl/t/018-host.t
lucy/trunk/perl/t/021-vtable.t
lucy/trunk/perl/t/binding/017-hash.t
lucy/trunk/perl/t/binding/019-obj.t
lucy/trunk/perl/xs/XSBind.h
lucy/trunk/ruby/src/CFBind.h
Modified: lucy/trunk/c/src/CFBind.h
URL:
http://svn.apache.org/viewvc/lucy/trunk/c/src/CFBind.h?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/c/src/CFBind.h (original)
+++ lucy/trunk/c/src/CFBind.h Sun Jul 22 15:12:07 2012
@@ -29,7 +29,7 @@ extern "C" {
#include "Lucy/Object/ByteBuf.h"
#include "Lucy/Object/CharBuf.h"
#include "Lucy/Object/Err.h"
-#include "Lucy/Object/Hash.h"
+#include "Clownfish/Hash.h"
#include "Clownfish/Num.h"
#include "Lucy/Object/VArray.h"
#include "Clownfish/VTable.h"
Copied: lucy/trunk/core/Clownfish/Hash.c (from r1364278,
lucy/trunk/core/Lucy/Object/Hash.c)
URL:
http://svn.apache.org/viewvc/lucy/trunk/core/Clownfish/Hash.c?p2=lucy/trunk/core/Clownfish/Hash.c&p1=lucy/trunk/core/Lucy/Object/Hash.c&r1=1364278&r2=1364322&rev=1364322&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Object/Hash.c (original)
+++ lucy/trunk/core/Clownfish/Hash.c Sun Jul 22 15:12:07 2012
@@ -24,7 +24,7 @@
#include "Clownfish/VTable.h"
-#include "Lucy/Object/Hash.h"
+#include "Clownfish/Hash.h"
#include "Lucy/Object/CharBuf.h"
#include "Lucy/Object/Err.h"
#include "Lucy/Object/VArray.h"
Copied: lucy/trunk/core/Clownfish/Hash.cfh (from r1364277,
lucy/trunk/core/Lucy/Object/Hash.cfh)
URL:
http://svn.apache.org/viewvc/lucy/trunk/core/Clownfish/Hash.cfh?p2=lucy/trunk/core/Clownfish/Hash.cfh&p1=lucy/trunk/core/Lucy/Object/Hash.cfh&r1=1364277&r2=1364322&rev=1364322&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Object/Hash.cfh (original)
+++ lucy/trunk/core/Clownfish/Hash.cfh Sun Jul 22 15:12:07 2012
@@ -24,7 +24,7 @@ parcel Lucy;
* this behavior can be changed by overridding Make_Key(), e.g. to implement
* efficient hash sets.
*/
-class Lucy::Object::Hash inherits Lucy::Object::Obj {
+class Clownfish::Hash inherits Lucy::Object::Obj {
void *entries;
uint32_t capacity;
@@ -149,7 +149,7 @@ class Lucy::Object::Hash inherits Lucy::
Destroy(Hash *self);
}
-class Lucy::Object::Hash::HashTombStone
+class Clownfish::Hash::HashTombStone
inherits Lucy::Object::Obj {
uint32_t
Modified: lucy/trunk/core/Clownfish/VTable.c
URL:
http://svn.apache.org/viewvc/lucy/trunk/core/Clownfish/VTable.c?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/core/Clownfish/VTable.c (original)
+++ lucy/trunk/core/Clownfish/VTable.c Sun Jul 22 15:12:07 2012
@@ -27,7 +27,7 @@
#include "Clownfish/VTable.h"
#include "Lucy/Object/CharBuf.h"
#include "Lucy/Object/Err.h"
-#include "Lucy/Object/Hash.h"
+#include "Clownfish/Hash.h"
#include "Clownfish/LockFreeRegistry.h"
#include "Clownfish/Method.h"
#include "Clownfish/Num.h"
Modified: lucy/trunk/core/Lucy.c
URL:
http://svn.apache.org/viewvc/lucy/trunk/core/Lucy.c?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/core/Lucy.c (original)
+++ lucy/trunk/core/Lucy.c Sun Jul 22 15:12:07 2012
@@ -15,7 +15,7 @@
*/
#include "Clownfish/Num.h"
-#include "Lucy/Object/Hash.h"
+#include "Clownfish/Hash.h"
#include "Lucy/Object/Err.h"
void
Modified: lucy/trunk/core/Lucy/Analysis/SnowballStopFilter.cfh
URL:
http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Analysis/SnowballStopFilter.cfh?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Analysis/SnowballStopFilter.cfh (original)
+++ lucy/trunk/core/Lucy/Analysis/SnowballStopFilter.cfh Sun Jul 22 15:12:07
2012
@@ -99,7 +99,7 @@ public class Lucy::Analysis::SnowballSto
Destroy(SnowballStopFilter *self);
}
-class Lucy::Analysis::SnowballStopFilter::NoCloneHash inherits
Lucy::Object::Hash {
+class Lucy::Analysis::SnowballStopFilter::NoCloneHash inherits Clownfish::Hash
{
inert incremented NoCloneHash*
new(uint32_t capacity = 0);
Modified: lucy/trunk/core/Lucy/Index/ZombieKeyedHash.cfh
URL:
http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Index/ZombieKeyedHash.cfh?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Index/ZombieKeyedHash.cfh (original)
+++ lucy/trunk/core/Lucy/Index/ZombieKeyedHash.cfh Sun Jul 22 15:12:07 2012
@@ -19,7 +19,7 @@ parcel Lucy;
/** Hash which creates keys allocated from a MemoryPool rather than malloc.
*/
class Lucy::Index::SortFieldWriter::ZombieKeyedHash cnick ZKHash
- inherits Lucy::Object::Hash {
+ inherits Clownfish::Hash {
MemoryPool *mem_pool;
uint8_t prim_id;
Modified: lucy/trunk/core/Lucy/Object/Obj.c
URL:
http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Object/Obj.c?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Object/Obj.c (original)
+++ lucy/trunk/core/Lucy/Object/Obj.c Sun Jul 22 15:12:07 2012
@@ -26,7 +26,7 @@
#include "Lucy/Object/Obj.h"
#include "Lucy/Object/CharBuf.h"
#include "Lucy/Object/Err.h"
-#include "Lucy/Object/Hash.h"
+#include "Clownfish/Hash.h"
#include "Clownfish/VTable.h"
#include "Lucy/Store/InStream.h"
#include "Lucy/Store/OutStream.h"
Modified: lucy/trunk/core/Lucy/Test/Object/TestHash.c
URL:
http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Test/Object/TestHash.c?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Test/Object/TestHash.c (original)
+++ lucy/trunk/core/Lucy/Test/Object/TestHash.c Sun Jul 22 15:12:07 2012
@@ -21,7 +21,7 @@
#include "Lucy/Test.h"
#include "Lucy/Test/TestUtils.h"
#include "Lucy/Test/Object/TestHash.h"
-#include "Lucy/Object/Hash.h"
+#include "Clownfish/Hash.h"
static void
test_Equals(TestBatch *batch) {
Modified: lucy/trunk/core/Lucy/Util/Json/JsonParser.y
URL:
http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Util/Json/JsonParser.y?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Util/Json/JsonParser.y (original)
+++ lucy/trunk/core/Lucy/Util/Json/JsonParser.y Sun Jul 22 15:12:07 2012
@@ -24,7 +24,7 @@
#include <stdio.h>
#include <string.h>
#include <assert.h>
-#include "Lucy/Object/Hash.h"
+#include "Clownfish/Hash.h"
#include "Lucy/Object/VArray.h"
#include "Lucy/Object/CharBuf.h"
#include "Lucy/Object/Err.h"
Modified: lucy/trunk/core/Lucy/Util/ToolSet.h
URL:
http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Util/ToolSet.h?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Util/ToolSet.h (original)
+++ lucy/trunk/core/Lucy/Util/ToolSet.h Sun Jul 22 15:12:07 2012
@@ -41,7 +41,7 @@ extern "C" {
#include "Lucy/Object/ByteBuf.h"
#include "Lucy/Object/CharBuf.h"
#include "Lucy/Object/Err.h"
-#include "Lucy/Object/Hash.h"
+#include "Clownfish/Hash.h"
#include "Lucy/Object/I32Array.h"
#include "Clownfish/Num.h"
#include "Lucy/Object/VArray.h"
Modified: lucy/trunk/example-lang/src/CFBind.h
URL:
http://svn.apache.org/viewvc/lucy/trunk/example-lang/src/CFBind.h?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/example-lang/src/CFBind.h (original)
+++ lucy/trunk/example-lang/src/CFBind.h Sun Jul 22 15:12:07 2012
@@ -29,7 +29,7 @@ extern "C" {
#include "Lucy/Object/ByteBuf.h"
#include "Lucy/Object/CharBuf.h"
#include "Lucy/Object/Err.h"
-#include "Lucy/Object/Hash.h"
+#include "Clownfish/Hash.h"
#include "Clownfish/Num.h"
#include "Lucy/Object/VArray.h"
#include "Clownfish/VTable.h"
Modified: lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm
URL:
http://svn.apache.org/viewvc/lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm (original)
+++ lucy/trunk/perl/buildlib/Lucy/Build/Binding/Object.pm Sun Jul 22 15:12:07
2012
@@ -242,7 +242,7 @@ sub bind_hash {
);
my $xs_code = <<'END_XS_CODE';
-MODULE = Lucy PACKAGE = Lucy::Object::Hash
+MODULE = Lucy PACKAGE = Clownfish::Hash
SV*
_deserialize(self, instream)
@@ -296,7 +296,7 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
- class_name => "Lucy::Object::Hash",
+ class_name => "Clownfish::Hash",
);
$binding->exclude_method($_) for @hand_rolled;
$binding->append_xs($xs_code);
Copied: lucy/trunk/perl/lib/Clownfish/Hash.pm (from r1364277,
lucy/trunk/perl/lib/Lucy/Object/Hash.pm)
URL:
http://svn.apache.org/viewvc/lucy/trunk/perl/lib/Clownfish/Hash.pm?p2=lucy/trunk/perl/lib/Clownfish/Hash.pm&p1=lucy/trunk/perl/lib/Lucy/Object/Hash.pm&r1=1364277&r2=1364322&rev=1364322&view=diff
==============================================================================
--- lucy/trunk/perl/lib/Lucy/Object/Hash.pm (original)
+++ lucy/trunk/perl/lib/Clownfish/Hash.pm Sun Jul 22 15:12:07 2012
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-package Lucy::Object::Hash;
+package Clownfish::Hash;
use Lucy;
our $VERSION = '0.003000';
$VERSION = eval $VERSION;
Modified: lucy/trunk/perl/lib/Lucy.pm
URL:
http://svn.apache.org/viewvc/lucy/trunk/perl/lib/Lucy.pm?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/perl/lib/Lucy.pm (original)
+++ lucy/trunk/perl/lib/Lucy.pm Sun Jul 22 15:12:07 2012
@@ -381,7 +381,7 @@ sub error {$Lucy::Object::Err::error}
}
{
- package Lucy::Object::Hash;
+ package Clownfish::Hash;
our $VERSION = '0.003000';
$VERSION = eval $VERSION;
no warnings 'redefine';
Modified: lucy/trunk/perl/t/018-host.t
URL:
http://svn.apache.org/viewvc/lucy/trunk/perl/t/018-host.t?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/perl/t/018-host.t (original)
+++ lucy/trunk/perl/t/018-host.t Sun Jul 22 15:12:07 2012
@@ -40,9 +40,9 @@ my $transformed = to_perl($kobj);
is_deeply( $transformed, \%complex_data_structure,
"transform from Perl to Clownfish data structures and back" );
-my $bread_and_butter = Lucy::Object::Hash->new;
+my $bread_and_butter = Clownfish::Hash->new;
$bread_and_butter->store( 'bread', Lucy::Object::ByteBuf->new('butter') );
-my $salt_and_pepper = Lucy::Object::Hash->new;
+my $salt_and_pepper = Clownfish::Hash->new;
$salt_and_pepper->store( 'salt', Lucy::Object::ByteBuf->new('pepper') );
$complex_data_structure{c} = $bread_and_butter;
$complex_data_structure{d} = $salt_and_pepper;
Modified: lucy/trunk/perl/t/021-vtable.t
URL:
http://svn.apache.org/viewvc/lucy/trunk/perl/t/021-vtable.t?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/perl/t/021-vtable.t (original)
+++ lucy/trunk/perl/t/021-vtable.t Sun Jul 22 15:12:07 2012
@@ -17,7 +17,7 @@ use strict;
use warnings;
package MyHash;
-use base qw( Lucy::Object::Hash );
+use base qw( Clownfish::Hash );
sub oodle { }
@@ -61,7 +61,7 @@ use Storable qw( nfreeze );
}
my $stringified;
-my $storage = Lucy::Object::Hash->new;
+my $storage = Clownfish::Hash->new;
{
my $subclassed_hash = MyHash->new;
Modified: lucy/trunk/perl/t/binding/017-hash.t
URL:
http://svn.apache.org/viewvc/lucy/trunk/perl/t/binding/017-hash.t?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/perl/t/binding/017-hash.t (original)
+++ lucy/trunk/perl/t/binding/017-hash.t Sun Jul 22 15:12:07 2012
@@ -21,7 +21,7 @@ use Storable qw( nfreeze thaw );
use Lucy::Test;
use Lucy qw( to_perl to_clownfish );
-my $hash = Lucy::Object::Hash->new( capacity => 10 );
+my $hash = Clownfish::Hash->new( capacity => 10 );
$hash->store( "foo", Lucy::Object::CharBuf->new("bar") );
$hash->store( "baz", Lucy::Object::CharBuf->new("banana") );
@@ -40,7 +40,7 @@ $outstream->close;
my $instream = Lucy::Store::InStream->open( file => $ram_file )
or die Lucy->error;
my $hash_vtable
- = Clownfish::VTable->singleton( class_name => 'Lucy::Object::Hash' );
+ = Clownfish::VTable->singleton( class_name => 'Clownfish::Hash' );
my $deserialized = $hash_vtable->make_obj->deserialize($instream);
is_deeply( $hash->to_perl, $deserialized->to_perl, "serialize/deserialize" );
Modified: lucy/trunk/perl/t/binding/019-obj.t
URL:
http://svn.apache.org/viewvc/lucy/trunk/perl/t/binding/019-obj.t?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/perl/t/binding/019-obj.t (original)
+++ lucy/trunk/perl/t/binding/019-obj.t Sun Jul 22 15:12:07 2012
@@ -79,8 +79,8 @@ eval { my $another_obj = TestObj->new( k
like( $@, qr/kill_me_now/, "reject bad param" );
my $stringified_perl_obj = "$object";
-require Lucy::Object::Hash;
-my $hash = Lucy::Object::Hash->new;
+require Clownfish::Hash;
+my $hash = Clownfish::Hash->new;
$hash->store( foo => $object );
is( $object->get_refcount, 2, "refcount increased via C code" );
is( $object->get_refcount, 2, "refcount increased via C code" );
@@ -114,7 +114,7 @@ SKIP: {
SKIP: {
skip( "Exception thrown within callback leaks", 1 )
if $ENV{LUCY_VALGRIND};
- $hash = Lucy::Object::Hash->new;
+ $hash = Clownfish::Hash->new;
$hash->store( foo => BadDump->new );
eval { $hash->dump };
like( $@, qr/NULL/,
Modified: lucy/trunk/perl/xs/XSBind.h
URL:
http://svn.apache.org/viewvc/lucy/trunk/perl/xs/XSBind.h?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/perl/xs/XSBind.h (original)
+++ lucy/trunk/perl/xs/XSBind.h Sun Jul 22 15:12:07 2012
@@ -29,7 +29,7 @@ extern "C" {
#include "Lucy/Object/ByteBuf.h"
#include "Lucy/Object/CharBuf.h"
#include "Lucy/Object/Err.h"
-#include "Lucy/Object/Hash.h"
+#include "Clownfish/Hash.h"
#include "Clownfish/Num.h"
#include "Lucy/Object/VArray.h"
#include "Clownfish/VTable.h"
Modified: lucy/trunk/ruby/src/CFBind.h
URL:
http://svn.apache.org/viewvc/lucy/trunk/ruby/src/CFBind.h?rev=1364322&r1=1364321&r2=1364322&view=diff
==============================================================================
--- lucy/trunk/ruby/src/CFBind.h (original)
+++ lucy/trunk/ruby/src/CFBind.h Sun Jul 22 15:12:07 2012
@@ -29,7 +29,7 @@ extern "C" {
#include "Lucy/Object/ByteBuf.h"
#include "Lucy/Object/CharBuf.h"
#include "Lucy/Object/Err.h"
-#include "Lucy/Object/Hash.h"
+#include "Clownfish/Hash.h"
#include "Clownfish/Num.h"
#include "Lucy/Object/VArray.h"
#include "Clownfish/VTable.h"