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 2012/07/22 17:45:23 UTC
[lucy-commits] svn commit: r1364334 - in /lucy/trunk: c/src/ core/Clownfish/
core/Lucy/Object/ core/Lucy/Util/ example-lang/src/
perl/buildlib/Lucy/Build/Binding/ perl/lib/ perl/lib/Clownfish/
perl/lib/Lucy/Object/ perl/lib/LucyX/Search/ perl/t/ perl/t/binding/ perl/...
Author: marvin
Date: Sun Jul 22 15:45:22 2012
New Revision: 1364334
URL: http://svn.apache.org/viewvc?rev=1364334&view=rev
Log:
LUCY-242 Move ByteBuf under Clownfish.
Added:
lucy/trunk/core/Clownfish/ByteBuf.c
- copied, changed from r1364278, lucy/trunk/core/Lucy/Object/ByteBuf.c
lucy/trunk/core/Clownfish/ByteBuf.cfh
- copied, changed from r1364277, lucy/trunk/core/Lucy/Object/ByteBuf.cfh
lucy/trunk/perl/lib/Clownfish/ByteBuf.pm
- copied, changed from r1364277, lucy/trunk/perl/lib/Lucy/Object/ByteBuf.pm
Removed:
lucy/trunk/core/Lucy/Object/ByteBuf.c
lucy/trunk/core/Lucy/Object/ByteBuf.cfh
lucy/trunk/perl/lib/Lucy/Object/ByteBuf.pm
Modified:
lucy/trunk/c/src/CFBind.h
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/lib/LucyX/Search/MockMatcher.pm
lucy/trunk/perl/t/015-sort_external.t
lucy/trunk/perl/t/018-host.t
lucy/trunk/perl/t/026-serialization.t
lucy/trunk/perl/t/028-sortexrun.t
lucy/trunk/perl/t/binding/022-bytebuf.t
lucy/trunk/perl/xs/Lucy/Index/Inverter.c
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=1364334&r1=1364333&r2=1364334&view=diff
==============================================================================
--- lucy/trunk/c/src/CFBind.h (original)
+++ lucy/trunk/c/src/CFBind.h Sun Jul 22 15:45:22 2012
@@ -26,7 +26,7 @@ extern "C" {
#include "charmony.h"
#include "Lucy/Object/Obj.h"
-#include "Lucy/Object/ByteBuf.h"
+#include "Clownfish/ByteBuf.h"
#include "Clownfish/CharBuf.h"
#include "Lucy/Object/Err.h"
#include "Clownfish/Hash.h"
Copied: lucy/trunk/core/Clownfish/ByteBuf.c (from r1364278, lucy/trunk/core/Lucy/Object/ByteBuf.c)
URL: http://svn.apache.org/viewvc/lucy/trunk/core/Clownfish/ByteBuf.c?p2=lucy/trunk/core/Clownfish/ByteBuf.c&p1=lucy/trunk/core/Lucy/Object/ByteBuf.c&r1=1364278&r2=1364334&rev=1364334&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Object/ByteBuf.c (original)
+++ lucy/trunk/core/Clownfish/ByteBuf.c Sun Jul 22 15:45:22 2012
@@ -25,7 +25,7 @@
#include <ctype.h>
#include "Clownfish/VTable.h"
-#include "Lucy/Object/ByteBuf.h"
+#include "Clownfish/ByteBuf.h"
#include "Lucy/Object/Err.h"
#include "Lucy/Store/InStream.h"
#include "Lucy/Store/OutStream.h"
Copied: lucy/trunk/core/Clownfish/ByteBuf.cfh (from r1364277, lucy/trunk/core/Lucy/Object/ByteBuf.cfh)
URL: http://svn.apache.org/viewvc/lucy/trunk/core/Clownfish/ByteBuf.cfh?p2=lucy/trunk/core/Clownfish/ByteBuf.cfh&p1=lucy/trunk/core/Lucy/Object/ByteBuf.cfh&r1=1364277&r2=1364334&rev=1364334&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Object/ByteBuf.cfh (original)
+++ lucy/trunk/core/Clownfish/ByteBuf.cfh Sun Jul 22 15:45:22 2012
@@ -20,7 +20,7 @@ parcel Lucy;
* Growable buffer holding arbitrary bytes.
*/
-class Lucy::Object::ByteBuf cnick BB inherits Lucy::Object::Obj {
+class Clownfish::ByteBuf cnick BB inherits Lucy::Object::Obj {
char *buf;
size_t size; /* number of valid bytes */
@@ -130,8 +130,8 @@ class Lucy::Object::ByteBuf cnick BB inh
/**
* A ByteBuf that doesn't own its own string.
*/
-class Lucy::Object::ViewByteBuf cnick ViewBB
- inherits Lucy::Object::ByteBuf {
+class Clownfish::ViewByteBuf cnick ViewBB
+ inherits Clownfish::ByteBuf {
/** Return a pointer to a new "view" ByteBuf, offing a persective on the
* passed-in string.
Modified: lucy/trunk/core/Lucy/Util/ToolSet.h
URL: http://svn.apache.org/viewvc/lucy/trunk/core/Lucy/Util/ToolSet.h?rev=1364334&r1=1364333&r2=1364334&view=diff
==============================================================================
--- lucy/trunk/core/Lucy/Util/ToolSet.h (original)
+++ lucy/trunk/core/Lucy/Util/ToolSet.h Sun Jul 22 15:45:22 2012
@@ -38,7 +38,7 @@ extern "C" {
#include <string.h>
#include "Lucy/Object/Obj.h"
#include "Lucy/Object/BitVector.h"
-#include "Lucy/Object/ByteBuf.h"
+#include "Clownfish/ByteBuf.h"
#include "Clownfish/CharBuf.h"
#include "Lucy/Object/Err.h"
#include "Clownfish/Hash.h"
Modified: lucy/trunk/example-lang/src/CFBind.h
URL: http://svn.apache.org/viewvc/lucy/trunk/example-lang/src/CFBind.h?rev=1364334&r1=1364333&r2=1364334&view=diff
==============================================================================
--- lucy/trunk/example-lang/src/CFBind.h (original)
+++ lucy/trunk/example-lang/src/CFBind.h Sun Jul 22 15:45:22 2012
@@ -26,7 +26,7 @@ extern "C" {
#include "charmony.h"
#include "Lucy/Object/Obj.h"
-#include "Lucy/Object/ByteBuf.h"
+#include "Clownfish/ByteBuf.h"
#include "Clownfish/CharBuf.h"
#include "Lucy/Object/Err.h"
#include "Clownfish/Hash.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=1364334&r1=1364333&r2=1364334&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:45:22 2012
@@ -83,7 +83,7 @@ END_CONSTRUCTOR
sub bind_bytebuf {
my $xs_code = <<'END_XS_CODE';
-MODULE = Lucy PACKAGE = Lucy::Object::ByteBuf
+MODULE = Lucy PACKAGE = Clownfish::ByteBuf
SV*
new(either_sv, sv)
@@ -112,7 +112,7 @@ END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
parcel => "Lucy",
- class_name => "Lucy::Object::ByteBuf",
+ class_name => "Clownfish::ByteBuf",
);
$binding->append_xs($xs_code);
$binding->exclude_constructor;
Copied: lucy/trunk/perl/lib/Clownfish/ByteBuf.pm (from r1364277, lucy/trunk/perl/lib/Lucy/Object/ByteBuf.pm)
URL: http://svn.apache.org/viewvc/lucy/trunk/perl/lib/Clownfish/ByteBuf.pm?p2=lucy/trunk/perl/lib/Clownfish/ByteBuf.pm&p1=lucy/trunk/perl/lib/Lucy/Object/ByteBuf.pm&r1=1364277&r2=1364334&rev=1364334&view=diff
==============================================================================
--- lucy/trunk/perl/lib/Lucy/Object/ByteBuf.pm (original)
+++ lucy/trunk/perl/lib/Clownfish/ByteBuf.pm Sun Jul 22 15:45:22 2012
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-package Lucy::Object::ByteBuf;
+package Clownfish::ByteBuf;
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=1364334&r1=1364333&r2=1364334&view=diff
==============================================================================
--- lucy/trunk/perl/lib/Lucy.pm (original)
+++ lucy/trunk/perl/lib/Lucy.pm Sun Jul 22 15:45:22 2012
@@ -289,7 +289,7 @@ sub error {$Lucy::Object::Err::error}
}
{
- package Lucy::Object::ByteBuf;
+ package Clownfish::ByteBuf;
our $VERSION = '0.003000';
$VERSION = eval $VERSION;
{
@@ -300,7 +300,7 @@ sub error {$Lucy::Object::Err::error}
}
{
- package Lucy::Object::ViewByteBuf;
+ package Clownfish::ViewByteBuf;
our $VERSION = '0.003000';
$VERSION = eval $VERSION;
use Carp;
Modified: lucy/trunk/perl/lib/LucyX/Search/MockMatcher.pm
URL: http://svn.apache.org/viewvc/lucy/trunk/perl/lib/LucyX/Search/MockMatcher.pm?rev=1364334&r1=1364333&r2=1364334&view=diff
==============================================================================
--- lucy/trunk/perl/lib/LucyX/Search/MockMatcher.pm (original)
+++ lucy/trunk/perl/lib/LucyX/Search/MockMatcher.pm Sun Jul 22 15:45:22 2012
@@ -30,7 +30,7 @@ sub new {
if ( ref( $args{scores} ) eq 'ARRAY' ) {
confess("Mismatch between scores and doc_ids array sizes")
unless scalar @{ $args{scores} } == $size;
- $scores = Lucy::Object::ByteBuf->new(
+ $scores = Clownfish::ByteBuf->new(
pack( "f$size", @{ $args{scores} } ) );
}
Modified: lucy/trunk/perl/t/015-sort_external.t
URL: http://svn.apache.org/viewvc/lucy/trunk/perl/t/015-sort_external.t?rev=1364334&r1=1364333&r2=1364334&view=diff
==============================================================================
--- lucy/trunk/perl/t/015-sort_external.t (original)
+++ lucy/trunk/perl/t/015-sort_external.t Sun Jul 22 15:45:22 2012
@@ -161,5 +161,5 @@ while ( defined( my $item = $sortex->fet
is_deeply( \@sort_output, \@orig, "Random binary strings of random length" );
@sort_output = ();
-sub new_bytebuf { Lucy::Object::ByteBuf->new(shift) }
+sub new_bytebuf { Clownfish::ByteBuf->new(shift) }
Modified: lucy/trunk/perl/t/018-host.t
URL: http://svn.apache.org/viewvc/lucy/trunk/perl/t/018-host.t?rev=1364334&r1=1364333&r2=1364334&view=diff
==============================================================================
--- lucy/trunk/perl/t/018-host.t (original)
+++ lucy/trunk/perl/t/018-host.t Sun Jul 22 15:45:22 2012
@@ -28,7 +28,7 @@ is( $object->_callback_f64, 5, "f64
is( $object->_callback_i64, 5, "integer callback" );
my $test_obj = $object->_callback_obj;
-isa_ok( $test_obj, "Lucy::Object::ByteBuf" );
+isa_ok( $test_obj, "Clownfish::ByteBuf" );
my %complex_data_structure = (
a => [ 1, 2, 3, { ooga => 'booga' } ],
@@ -41,9 +41,9 @@ is_deeply( $transformed, \%complex_data_
"transform from Perl to Clownfish data structures and back" );
my $bread_and_butter = Clownfish::Hash->new;
-$bread_and_butter->store( 'bread', Lucy::Object::ByteBuf->new('butter') );
+$bread_and_butter->store( 'bread', Clownfish::ByteBuf->new('butter') );
my $salt_and_pepper = Clownfish::Hash->new;
-$salt_and_pepper->store( 'salt', Lucy::Object::ByteBuf->new('pepper') );
+$salt_and_pepper->store( 'salt', Clownfish::ByteBuf->new('pepper') );
$complex_data_structure{c} = $bread_and_butter;
$complex_data_structure{d} = $salt_and_pepper;
$transformed = to_perl( to_clownfish( \%complex_data_structure ) );
Modified: lucy/trunk/perl/t/026-serialization.t
URL: http://svn.apache.org/viewvc/lucy/trunk/perl/t/026-serialization.t?rev=1364334&r1=1364333&r2=1364334&view=diff
==============================================================================
--- lucy/trunk/perl/t/026-serialization.t (original)
+++ lucy/trunk/perl/t/026-serialization.t Sun Jul 22 15:45:22 2012
@@ -72,7 +72,7 @@ run_test_cycle( $obj, sub { ref( $_[0] )
my $subclassed_obj = MyObj->new("bar");
run_test_cycle( $subclassed_obj, sub { shift->get_extra } );
-my $bb = Lucy::Object::ByteBuf->new("foo");
+my $bb = Clownfish::ByteBuf->new("foo");
run_test_cycle( $bb, sub { shift->to_perl } );
SKIP: {
Modified: lucy/trunk/perl/t/028-sortexrun.t
URL: http://svn.apache.org/viewvc/lucy/trunk/perl/t/028-sortexrun.t?rev=1364334&r1=1364333&r2=1364334&view=diff
==============================================================================
--- lucy/trunk/perl/t/028-sortexrun.t (original)
+++ lucy/trunk/perl/t/028-sortexrun.t Sun Jul 22 15:45:22 2012
@@ -23,7 +23,7 @@ use Lucy::Test;
use Lucy qw( to_perl );
my $letters = Clownfish::VArray->new( capacity => 26 );
-$letters->push( Lucy::Object::ByteBuf->new($_) ) for 'a' .. 'z';
+$letters->push( Clownfish::ByteBuf->new($_) ) for 'a' .. 'z';
my $run = Lucy::Test::Util::BBSortEx->new( external => $letters );
$run->set_mem_thresh(5);
@@ -31,7 +31,7 @@ my $num_in_cache = $run->refill;
is( $run->cache_count, 5, "Read_Elem puts the brakes on Refill" );
my $endpost = $run->peek_last;
is( $endpost, 'e', "Peek_Last" );
-$endpost = Lucy::Object::ByteBuf->new('b');
+$endpost = Clownfish::ByteBuf->new('b');
my $slice = $run->pop_slice($endpost);
is( scalar @$slice, 2, "Pop_Slice gets only less-than-or-equal elems" );
@$slice = map { to_perl($_) } @$slice;
@@ -40,7 +40,7 @@ is_deeply( $slice, [qw( a b )], "Pop_Sli
my @got = qw( a b );
while (1) {
$endpost = $run->peek_last;
- $slice = $run->pop_slice( Lucy::Object::ByteBuf->new($endpost) );
+ $slice = $run->pop_slice( Clownfish::ByteBuf->new($endpost) );
push @got, map { to_perl($_) } @$slice;
last unless $run->refill;
}
Modified: lucy/trunk/perl/t/binding/022-bytebuf.t
URL: http://svn.apache.org/viewvc/lucy/trunk/perl/t/binding/022-bytebuf.t?rev=1364334&r1=1364333&r2=1364334&view=diff
==============================================================================
--- lucy/trunk/perl/t/binding/022-bytebuf.t (original)
+++ lucy/trunk/perl/t/binding/022-bytebuf.t Sun Jul 22 15:45:22 2012
@@ -20,7 +20,7 @@ use Test::More tests => 1;
use Storable qw( freeze thaw );
use Lucy::Test;
-my $orig = Lucy::Object::ByteBuf->new("foo");
+my $orig = Clownfish::ByteBuf->new("foo");
my $frozen = freeze($orig);
my $thawed = thaw($frozen);
is( $thawed->to_perl, $orig->to_perl, "freeze/thaw" );
Modified: lucy/trunk/perl/xs/Lucy/Index/Inverter.c
URL: http://svn.apache.org/viewvc/lucy/trunk/perl/xs/Lucy/Index/Inverter.c?rev=1364334&r1=1364333&r2=1364334&view=diff
==============================================================================
--- lucy/trunk/perl/xs/Lucy/Index/Inverter.c (original)
+++ lucy/trunk/perl/xs/Lucy/Index/Inverter.c Sun Jul 22 15:45:22 2012
@@ -20,7 +20,7 @@
#include "Lucy/Index/Inverter.h"
#include "Lucy/Document/Doc.h"
#include "Lucy/Index/Segment.h"
-#include "Lucy/Object/ByteBuf.h"
+#include "Clownfish/ByteBuf.h"
#include "Lucy/Plan/FieldType.h"
#include "Lucy/Plan/BlobType.h"
#include "Lucy/Plan/NumericType.h"
Modified: lucy/trunk/perl/xs/XSBind.h
URL: http://svn.apache.org/viewvc/lucy/trunk/perl/xs/XSBind.h?rev=1364334&r1=1364333&r2=1364334&view=diff
==============================================================================
--- lucy/trunk/perl/xs/XSBind.h (original)
+++ lucy/trunk/perl/xs/XSBind.h Sun Jul 22 15:45:22 2012
@@ -26,7 +26,7 @@ extern "C" {
#include "charmony.h"
#include "Lucy/Object/Obj.h"
-#include "Lucy/Object/ByteBuf.h"
+#include "Clownfish/ByteBuf.h"
#include "Clownfish/CharBuf.h"
#include "Lucy/Object/Err.h"
#include "Clownfish/Hash.h"
Modified: lucy/trunk/ruby/src/CFBind.h
URL: http://svn.apache.org/viewvc/lucy/trunk/ruby/src/CFBind.h?rev=1364334&r1=1364333&r2=1364334&view=diff
==============================================================================
--- lucy/trunk/ruby/src/CFBind.h (original)
+++ lucy/trunk/ruby/src/CFBind.h Sun Jul 22 15:45:22 2012
@@ -26,7 +26,7 @@ extern "C" {
#include "charmony.h"
#include "Lucy/Object/Obj.h"
-#include "Lucy/Object/ByteBuf.h"
+#include "Clownfish/ByteBuf.h"
#include "Clownfish/CharBuf.h"
#include "Lucy/Object/Err.h"
#include "Clownfish/Hash.h"