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/11/15 05:16:27 UTC
[lucy-commits] [6/8] git commit: refs/heads/kill_clownfish_host - Remove XS binding
for Clownfish::Host.
Remove XS binding for Clownfish::Host.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/4395f10f
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/4395f10f
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/4395f10f
Branch: refs/heads/kill_clownfish_host
Commit: 4395f10fa0ec87bed9eb4062b93a604ed74f4342
Parents: 87d197f
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Wed Nov 14 18:41:22 2012 -0800
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Wed Nov 14 18:41:22 2012 -0800
----------------------------------------------------------------------
perl/buildlib/Lucy/Build/Binding/Object.pm | 88 -----------------------
perl/t/018-host.t | 12 +---
2 files changed, 1 insertions(+), 99 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/4395f10f/perl/buildlib/Lucy/Build/Binding/Object.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build/Binding/Object.pm b/perl/buildlib/Lucy/Build/Binding/Object.pm
index 0951295..ec4076b 100644
--- a/perl/buildlib/Lucy/Build/Binding/Object.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Object.pm
@@ -26,7 +26,6 @@ sub bind_all {
$class->bind_charbuf;
$class->bind_err;
$class->bind_hash;
- $class->bind_host;
$class->bind_i32array;
$class->bind_lockfreeregistry;
$class->bind_float32;
@@ -308,93 +307,6 @@ END_XS_CODE
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
-sub bind_host {
- my $xs_code = <<'END_XS_CODE';
-MODULE = Lucy PACKAGE = Clownfish::Host
-
-=for comment
-
-These are all for testing purposes only.
-
-=cut
-
-IV
-_test(...)
-CODE:
- RETVAL = items;
-OUTPUT: RETVAL
-
-SV*
-_test_obj(...)
-CODE:
-{
- lucy_ByteBuf *test_obj = lucy_BB_new_bytes("blah", 4);
- SV *pack_var = get_sv("Clownfish::Host::testobj", 1);
- RETVAL = (SV*)Lucy_BB_To_Host(test_obj);
- SvSetSV_nosteal(pack_var, RETVAL);
- CFISH_DECREF(test_obj);
- CHY_UNUSED_VAR(items);
-}
-OUTPUT: RETVAL
-
-void
-_callback(obj)
- lucy_Obj *obj;
-PPCODE:
-{
- lucy_ZombieCharBuf *blank = CFISH_ZCB_BLANK();
- lucy_Host_callback(obj, "_test", 2,
- CFISH_ARG_OBJ("nothing", (lucy_CharBuf*)blank),
- CFISH_ARG_I32("foo", 3));
-}
-
-int64_t
-_callback_i64(obj)
- lucy_Obj *obj;
-CODE:
-{
- lucy_ZombieCharBuf *blank = CFISH_ZCB_BLANK();
- RETVAL
- = lucy_Host_callback_i64(obj, "_test", 2,
- CFISH_ARG_OBJ("nothing", (lucy_CharBuf*)blank),
- CFISH_ARG_I32("foo", 3));
-}
-OUTPUT: RETVAL
-
-double
-_callback_f64(obj)
- lucy_Obj *obj;
-CODE:
-{
- lucy_ZombieCharBuf *blank = CFISH_ZCB_BLANK();
- RETVAL
- = lucy_Host_callback_f64(obj, "_test", 2,
- CFISH_ARG_OBJ("nothing", (lucy_CharBuf*)blank),
- CFISH_ARG_I32("foo", 3));
-}
-OUTPUT: RETVAL
-
-SV*
-_callback_obj(obj)
- lucy_Obj *obj;
-CODE:
-{
- lucy_Obj *other = lucy_Host_callback_obj(obj, "_test_obj", 0);
- RETVAL = (SV*)Lucy_Obj_To_Host(other);
- CFISH_DECREF(other);
-}
-OUTPUT: RETVAL
-END_XS_CODE
-
- my $binding = Clownfish::CFC::Binding::Perl::Class->new(
- parcel => "Lucy",
- class_name => "Clownfish::Host",
- );
- $binding->append_xs($xs_code);
-
- Clownfish::CFC::Binding::Perl::Class->register($binding);
-}
-
sub bind_i32array {
my $xs_code = <<'END_XS_CODE';
MODULE = Lucy PACKAGE = Lucy::Object::I32Array
http://git-wip-us.apache.org/repos/asf/lucy/blob/4395f10f/perl/t/018-host.t
----------------------------------------------------------------------
diff --git a/perl/t/018-host.t b/perl/t/018-host.t
index 85435c4..291c4db 100644
--- a/perl/t/018-host.t
+++ b/perl/t/018-host.t
@@ -16,20 +16,10 @@
use strict;
use warnings;
-use Test::More tests => 8;
+use Test::More tests => 3;
use Lucy::Test;
use Lucy qw( to_perl to_clownfish );
-my $object = Clownfish::Host->new();
-isa_ok( $object, "Clownfish::Host" );
-
-is( $object->_callback, undef, "void callback" );
-is( $object->_callback_f64, 5, "f64 callback" );
-is( $object->_callback_i64, 5, "integer callback" );
-
-my $test_obj = $object->_callback_obj;
-isa_ok( $test_obj, "Clownfish::ByteBuf" );
-
my %complex_data_structure = (
a => [ 1, 2, 3, { ooga => 'booga' } ],
b => { foo => 'foofoo', bar => 'barbar' },