Author: marvin
Date: Wed Mar 14 18:42:22 2012
New Revision: 1300684

URL: http://svn.apache.org/viewvc?rev=1300684&view=rev
Log:
Move Type under Clownfish::CFC::Model.

Added:
    incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC/Model/
    incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC/Model/Type.pm
      - copied, changed from r1300665, 
incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC/Type.pm
Removed:
    incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC/Type.pm
Modified:
    incubator/lucy/trunk/clownfish/perl/MANIFEST
    incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.pm
    incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs
    incubator/lucy/trunk/clownfish/perl/t/100-type.t
    incubator/lucy/trunk/clownfish/perl/t/101-primitive_type.t
    incubator/lucy/trunk/clownfish/perl/t/102-integer_type.t
    incubator/lucy/trunk/clownfish/perl/t/103-float_type.t
    incubator/lucy/trunk/clownfish/perl/t/104-void_type.t
    incubator/lucy/trunk/clownfish/perl/t/105-object_type.t
    incubator/lucy/trunk/clownfish/perl/t/106-va_list_type.t
    incubator/lucy/trunk/clownfish/perl/t/107-arbitrary_type.t
    incubator/lucy/trunk/clownfish/perl/t/108-composite_type.t
    incubator/lucy/trunk/clownfish/perl/t/300-variable.t
    incubator/lucy/trunk/clownfish/perl/t/301-param_list.t
    incubator/lucy/trunk/clownfish/perl/t/600-parser.t
    incubator/lucy/trunk/clownfish/perl/typemap

Modified: incubator/lucy/trunk/clownfish/perl/MANIFEST
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/MANIFEST?rev=1300684&r1=1300683&r2=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/MANIFEST (original)
+++ incubator/lucy/trunk/clownfish/perl/MANIFEST Wed Mar 14 18:42:22 2012
@@ -27,7 +27,7 @@ lib/Clownfish/CFC/ParamList.pm
 lib/Clownfish/CFC/Parcel.pm
 lib/Clownfish/CFC/Parser.pm
 lib/Clownfish/CFC/Symbol.pm
-lib/Clownfish/CFC/Type.pm
+lib/Clownfish/CFC/Model/Type.pm
 lib/Clownfish/CFC/Util.pm
 lib/Clownfish/CFC/Variable.pm
 MANIFEST                       This list of files

Modified: incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.pm
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.pm?rev=1300684&r1=1300683&r2=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.pm (original)
+++ incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.pm Wed Mar 14 
18:42:22 2012
@@ -367,7 +367,7 @@ BEGIN { XSLoader::load( 'Clownfish::CFC'
 }
 
 {
-    package Clownfish::CFC::Type;
+    package Clownfish::CFC::Model::Type;
     BEGIN { push our @ISA, 'Clownfish::CFC::Base' }
     use Clownfish::CFC::Util qw( verify_args a_isa_b );
     use Scalar::Util qw( blessed );

Modified: incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs?rev=1300684&r1=1300683&r2=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs (original)
+++ incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.xs Wed Mar 14 
18:42:22 2012
@@ -1182,7 +1182,7 @@ PPCODE:
 }
 
 
-MODULE = Clownfish::CFC   PACKAGE = Clownfish::CFC::Type
+MODULE = Clownfish::CFC   PACKAGE = Clownfish::CFC::Model::Type
 
 SV*
 _new(flags, parcel, specifier, indirection, c_string)
@@ -1238,12 +1238,12 @@ _new_composite(flags, child_sv, indirect
     const char *array;
 CODE:
     CFCType *child = NULL;
-    if (SvOK(child_sv) && sv_derived_from(child_sv, "Clownfish::CFC::Type")) {
+    if (SvOK(child_sv) && sv_derived_from(child_sv, 
"Clownfish::CFC::Model::Type")) {
         IV objint = SvIV((SV*)SvRV(child_sv));
         child = INT2PTR(CFCType*, objint);
     }
     else {
-        croak("Param 'child' not a Clownfish::CFC::Type");
+        croak("Param 'child' not a Clownfish::CFC::Model::Type");
     }
     CFCType *self = CFCType_new_composite(flags, child, indirection, array);
     RETVAL = S_cfcbase_to_perlref(self);
@@ -1564,12 +1564,12 @@ CODE:
     int inert               = SvOK(inert_sv)
                               ? !!SvTRUE(inert_sv) : 0;
     CFCType *type = NULL;
-    if (SvOK(type_sv) && sv_derived_from(type_sv, "Clownfish::CFC::Type")) {
+    if (SvOK(type_sv) && sv_derived_from(type_sv, 
"Clownfish::CFC::Model::Type")) {
         IV objint = SvIV((SV*)SvRV(type_sv));
         type = INT2PTR(CFCType*, objint);
     }
     else {
-        croak("Param 'type' is not a Clownfish::CFC::Type");
+        croak("Param 'type' is not a Clownfish::CFC::Model::Type");
     }
     CFCVariable *self = CFCVariable_new(parcel, exposure, class_name,
                                         class_cnick, micro_sym, type, inert);

Copied: incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC/Model/Type.pm 
(from r1300665, incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC/Type.pm)
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC/Model/Type.pm?p2=incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC/Model/Type.pm&p1=incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC/Type.pm&r1=1300665&r2=1300684&rev=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC/Type.pm (original)
+++ incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC/Model/Type.pm Wed Mar 
14 18:42:22 2012
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-package Clownfish::CFC::Type;
+package Clownfish::CFC::Model::Type;
 use Clownfish::CFC;
 
 1;

Modified: incubator/lucy/trunk/clownfish/perl/t/100-type.t
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/t/100-type.t?rev=1300684&r1=1300683&r2=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/t/100-type.t (original)
+++ incubator/lucy/trunk/clownfish/perl/t/100-type.t Wed Mar 14 18:42:22 2012
@@ -21,8 +21,10 @@ use Clownfish::CFC::Parcel;
 
 my $neato_parcel = Clownfish::CFC::Parcel->singleton( name => 'Neato' );
 
-my $type
-    = Clownfish::CFC::Type->new( parcel => 'Neato', specifier => 'mytype_t' );
+my $type = Clownfish::CFC::Model::Type->new(
+    parcel    => 'Neato',
+    specifier => 'mytype_t'
+);
 is( ${ $type->get_parcel },
     $$neato_parcel, "constructor changes parcel name to Parcel singleton" );
 

Modified: incubator/lucy/trunk/clownfish/perl/t/101-primitive_type.t
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/t/101-primitive_type.t?rev=1300684&r1=1300683&r2=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/t/101-primitive_type.t (original)
+++ incubator/lucy/trunk/clownfish/perl/t/101-primitive_type.t Wed Mar 14 
18:42:22 2012
@@ -31,6 +31,6 @@ $other = new_primitive_type( specifier =
 ok( !$type->equals($other), "equals() spoiled by const" );
 
 sub new_primitive_type {
-    return Clownfish::CFC::Type->new( @_, primitive => 1 );
+    return Clownfish::CFC::Model::Type->new( @_, primitive => 1 );
 }
 

Modified: incubator/lucy/trunk/clownfish/perl/t/102-integer_type.t
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/t/102-integer_type.t?rev=1300684&r1=1300683&r2=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/t/102-integer_type.t (original)
+++ incubator/lucy/trunk/clownfish/perl/t/102-integer_type.t Wed Mar 14 
18:42:22 2012
@@ -17,10 +17,10 @@ use strict;
 use warnings;
 
 use Test::More tests => 87;
-use Clownfish::CFC::Type;
+use Clownfish::CFC::Model::Type;
 use Clownfish::CFC::Parser;
 
-my $integer_type = Clownfish::CFC::Type->new_integer(
+my $integer_type = Clownfish::CFC::Model::Type->new_integer(
     specifier => 'int32_t',
     const     => 1,
 );
@@ -51,10 +51,10 @@ my @c_specifiers = qw(
 
 for my $chy_specifier (@chy_specifiers) {
     my $type = $parser->parse($chy_specifier);
-    isa_ok( $type, "Clownfish::CFC::Type" );
+    isa_ok( $type, "Clownfish::CFC::Model::Type" );
     ok( $type && $type->is_integer, "parsed Type is_integer()" );
     $type = $parser->parse("const $chy_specifier");
-    isa_ok( $type, "Clownfish::CFC::Type" );
+    isa_ok( $type, "Clownfish::CFC::Model::Type" );
     ok( $type && $type->is_integer, "parsed const Type is_integer()" );
     ok( $type && $type->const,      "parsed const Type is const()" );
 SKIP: {
@@ -67,10 +67,10 @@ SKIP: {
 
 for my $c_specifier (@c_specifiers) {
     my $type = $parser->parse($c_specifier);
-    isa_ok( $type, "Clownfish::CFC::Type" );
+    isa_ok( $type, "Clownfish::CFC::Model::Type" );
     ok( $type && $type->is_integer, "parsed Type is_integer()" );
     $type = $parser->parse("const $c_specifier");
-    isa_ok( $type, "Clownfish::CFC::Type" );
+    isa_ok( $type, "Clownfish::CFC::Model::Type" );
     ok( $type && $type->is_integer, "parsed const Type is_integer()" );
     ok( $type && $type->const,      "parsed const Type is const()" );
 SKIP: {

Modified: incubator/lucy/trunk/clownfish/perl/t/103-float_type.t
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/t/103-float_type.t?rev=1300684&r1=1300683&r2=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/t/103-float_type.t (original)
+++ incubator/lucy/trunk/clownfish/perl/t/103-float_type.t Wed Mar 14 18:42:22 
2012
@@ -17,10 +17,10 @@ use strict;
 use warnings;
 
 use Test::More tests => 15;
-use Clownfish::CFC::Type;
+use Clownfish::CFC::Model::Type;
 use Clownfish::CFC::Parser;
 
-my $float_type = Clownfish::CFC::Type->new_float(
+my $float_type = Clownfish::CFC::Model::Type->new_float(
     specifier => 'float',
     const     => 1,
 );
@@ -32,10 +32,10 @@ my $parser = Clownfish::CFC::Parser->new
 
 for my $specifier (qw( float double)) {
     my $type = $parser->parse($specifier);
-    isa_ok( $type, "Clownfish::CFC::Type" );
+    isa_ok( $type, "Clownfish::CFC::Model::Type" );
     ok( $type && $type->is_floating, "parsed specifier is_floating()" );
     $type = $parser->parse("const $specifier");
-    isa_ok( $type, "Clownfish::CFC::Type" );
+    isa_ok( $type, "Clownfish::CFC::Model::Type" );
     ok( $type && $type->is_floating, "parsed const specifier is_floating()" );
     ok( $type && $type->const,       "parsed const specifier is_floating()" );
 SKIP: {

Modified: incubator/lucy/trunk/clownfish/perl/t/104-void_type.t
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/t/104-void_type.t?rev=1300684&r1=1300683&r2=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/t/104-void_type.t (original)
+++ incubator/lucy/trunk/clownfish/perl/t/104-void_type.t Wed Mar 14 18:42:22 
2012
@@ -17,26 +17,26 @@ use strict;
 use warnings;
 
 use Test::More tests => 11;
-use Clownfish::CFC::Type;
+use Clownfish::CFC::Model::Type;
 use Clownfish::CFC::Parser;
 
-my $void_type = Clownfish::CFC::Type->new_void;
+my $void_type = Clownfish::CFC::Model::Type->new_void;
 is( $void_type->get_specifier, "void", "specifier defaults to 'void'" );
 is( $void_type->to_c,          "void", "to_c" );
 ok( $void_type->is_void, "is_void" );
 
-$void_type = Clownfish::CFC::Type->new_void( const => 1 );
+$void_type = Clownfish::CFC::Model::Type->new_void( const => 1 );
 ok( $void_type->const, "const" );
 like( $void_type->to_c, qr/const/, "'const' in C representation" );
 
 my $parser = Clownfish::CFC::Parser->new;
 
 $void_type = $parser->parse('void');
-isa_ok( $void_type, "Clownfish::CFC::Type" );
+isa_ok( $void_type, "Clownfish::CFC::Model::Type" );
 ok( $void_type && $void_type->is_void,
     "Parser calls new_void() when parsing 'void'" );
 my $const_void_type = $parser->parse('const void');
-isa_ok( $const_void_type, "Clownfish::CFC::Type" );
+isa_ok( $const_void_type, "Clownfish::CFC::Model::Type" );
 ok( $const_void_type && $const_void_type->is_void,
     "Parser calls new_void() when parsing 'const void'"
 );

Modified: incubator/lucy/trunk/clownfish/perl/t/105-object_type.t
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/t/105-object_type.t?rev=1300684&r1=1300683&r2=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/t/105-object_type.t (original)
+++ incubator/lucy/trunk/clownfish/perl/t/105-object_type.t Wed Mar 14 18:42:22 
2012
@@ -17,7 +17,7 @@ use strict;
 use warnings;
 
 use Test::More tests => 55;
-use Clownfish::CFC::Type;
+use Clownfish::CFC::Model::Type;
 use Clownfish::CFC::Parser;
 
 my $parser = Clownfish::CFC::Parser->new;
@@ -28,7 +28,7 @@ my $parcel = $parser->parse('parcel Neat
 
 for my $bad_specifier (qw( foo fooBar Foo_Bar FOOBAR 1Foo 1FOO )) {
     eval {
-        my $type = Clownfish::CFC::Type->new_object(
+        my $type = Clownfish::CFC::Model::Type->new_object(
             parcel    => 'Neato',
             specifier => $bad_specifier,
         );
@@ -59,12 +59,12 @@ for my $specifier (qw( Foo FooJr FooIII 
         "nullable $specifier*" );
 }
 
-eval { my $type = Clownfish::CFC::Type->new_object };
+eval { my $type = Clownfish::CFC::Model::Type->new_object };
 like( $@, qr/specifier/i, "specifier required" );
 
 for ( 0, 2 ) {
     eval {
-        my $type = Clownfish::CFC::Type->new_object(
+        my $type = Clownfish::CFC::Model::Type->new_object(
             specifier   => 'Foo',
             indirection => $_,
         );
@@ -72,14 +72,15 @@ for ( 0, 2 ) {
     like( $@, qr/indirection/i, "invalid indirection of $_" );
 }
 
-my $foo_type    = Clownfish::CFC::Type->new_object( specifier => 'Foo' );
-my $another_foo = Clownfish::CFC::Type->new_object( specifier => 'Foo' );
+my $foo_type = Clownfish::CFC::Model::Type->new_object( specifier => 'Foo' );
+my $another_foo
+    = Clownfish::CFC::Model::Type->new_object( specifier => 'Foo' );
 ok( $foo_type->equals($another_foo), "equals" );
 
-my $bar_type = Clownfish::CFC::Type->new_object( specifier => 'Bar' );
+my $bar_type = Clownfish::CFC::Model::Type->new_object( specifier => 'Bar' );
 ok( !$foo_type->equals($bar_type), "different specifier spoils equals" );
 
-my $foreign_foo = Clownfish::CFC::Type->new_object(
+my $foreign_foo = Clownfish::CFC::Model::Type->new_object(
     specifier => 'Foo',
     parcel    => 'Foreign',
 );
@@ -87,7 +88,7 @@ ok( !$foo_type->equals($foreign_foo), "d
 is( $foreign_foo->get_specifier, "foreign_Foo",
     "prepend parcel prefix to specifier" );
 
-my $incremented_foo = Clownfish::CFC::Type->new_object(
+my $incremented_foo = Clownfish::CFC::Model::Type->new_object(
     specifier   => 'Foo',
     incremented => 1,
 );
@@ -97,7 +98,7 @@ ok( !$foo_type->equals($incremented_foo)
     "different incremented spoils equals"
 );
 
-my $decremented_foo = Clownfish::CFC::Type->new_object(
+my $decremented_foo = Clownfish::CFC::Model::Type->new_object(
     specifier   => 'Foo',
     decremented => 1,
 );
@@ -107,14 +108,15 @@ ok( !$foo_type->equals($decremented_foo)
     "different decremented spoils equals"
 );
 
-my $const_foo = Clownfish::CFC::Type->new_object(
+my $const_foo = Clownfish::CFC::Model::Type->new_object(
     specifier => 'Foo',
     const     => 1,
 );
 ok( !$foo_type->equals($const_foo), "different const spoils equals" );
 like( $const_foo->to_c, qr/const/, "const included in C representation" );
 
-my $string_type = Clownfish::CFC::Type->new_object( specifier => 'CharBuf', );
+my $string_type
+    = Clownfish::CFC::Model::Type->new_object( specifier => 'CharBuf', );
 ok( !$foo_type->is_string_type,   "Not is_string_type" );
 ok( $string_type->is_string_type, "is_string_type" );
 

Modified: incubator/lucy/trunk/clownfish/perl/t/106-va_list_type.t
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/t/106-va_list_type.t?rev=1300684&r1=1300683&r2=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/t/106-va_list_type.t (original)
+++ incubator/lucy/trunk/clownfish/perl/t/106-va_list_type.t Wed Mar 14 
18:42:22 2012
@@ -17,10 +17,10 @@ use strict;
 use warnings;
 
 use Test::More tests => 4;
-use Clownfish::CFC::Type;
+use Clownfish::CFC::Model::Type;
 use Clownfish::CFC::Parser;
 
-my $va_list_type = Clownfish::CFC::Type->new_va_list;
+my $va_list_type = Clownfish::CFC::Model::Type->new_va_list;
 is( $va_list_type->get_specifier,
     "va_list", "specifier defaults to 'va_list'" );
 is( $va_list_type->to_c, "va_list", "to_c" );

Modified: incubator/lucy/trunk/clownfish/perl/t/107-arbitrary_type.t
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/t/107-arbitrary_type.t?rev=1300684&r1=1300683&r2=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/t/107-arbitrary_type.t (original)
+++ incubator/lucy/trunk/clownfish/perl/t/107-arbitrary_type.t Wed Mar 14 
18:42:22 2012
@@ -17,17 +17,17 @@ use strict;
 use warnings;
 
 use Test::More tests => 10;
-use Clownfish::CFC::Type;
+use Clownfish::CFC::Model::Type;
 use Clownfish::CFC::Parser;
 
-my $foo_type = Clownfish::CFC::Type->new_arbitrary(
+my $foo_type = Clownfish::CFC::Model::Type->new_arbitrary(
     parcel    => 'Neato',
     specifier => "foo_t",
 );
 is( $foo_type->get_specifier, "foo_t", "get_specifier" );
 is( $foo_type->to_c,          "foo_t", "to_c" );
 
-my $compare_t_type = Clownfish::CFC::Type->new_arbitrary(
+my $compare_t_type = Clownfish::CFC::Model::Type->new_arbitrary(
     parcel    => 'Neato',
     specifier => "Sort_compare_t",
 );
@@ -35,7 +35,7 @@ is( $compare_t_type->get_specifier,
     "neato_Sort_compare_t", "Prepend prefix to specifier" );
 is( $compare_t_type->to_c, "neato_Sort_compare_t", "to_c" );
 
-my $twin = Clownfish::CFC::Type->new_arbitrary(
+my $twin = Clownfish::CFC::Model::Type->new_arbitrary(
     parcel    => 'Neato',
     specifier => "foo_t",
 );

Modified: incubator/lucy/trunk/clownfish/perl/t/108-composite_type.t
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/t/108-composite_type.t?rev=1300684&r1=1300683&r2=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/t/108-composite_type.t (original)
+++ incubator/lucy/trunk/clownfish/perl/t/108-composite_type.t Wed Mar 14 
18:42:22 2012
@@ -17,7 +17,7 @@ use strict;
 use warnings;
 
 use Test::More tests => 23;
-use Clownfish::CFC::Type;
+use Clownfish::CFC::Model::Type;
 use Clownfish::CFC::Parser;
 
 my $parser = Clownfish::CFC::Parser->new;
@@ -46,26 +46,26 @@ for my $input (@composite_type_strings) 
     ok( $type && $type->is_composite, $input );
 }
 
-eval { my $type = Clownfish::CFC::Type->new_composite };
+eval { my $type = Clownfish::CFC::Model::Type->new_composite };
 like( $@, qr/child/i, "child required" );
 
-my $foo_type = Clownfish::CFC::Type->new_object( specifier => 'Foo' );
-my $composite_type = Clownfish::CFC::Type->new_composite(
+my $foo_type = Clownfish::CFC::Model::Type->new_object( specifier => 'Foo' );
+my $composite_type = Clownfish::CFC::Model::Type->new_composite(
     child       => $foo_type,
     indirection => 1,
 );
 is( $composite_type->get_specifier,
     'Foo', "get_specifier delegates to child" );
 
-my $other = Clownfish::CFC::Type->new_composite(
+my $other = Clownfish::CFC::Model::Type->new_composite(
     child       => $foo_type,
     indirection => 1,
 );
 ok( $composite_type->equals($other), "equals" );
 ok( $composite_type->is_composite,   "is_composite" );
 
-my $bar_type = Clownfish::CFC::Type->new_object( specifier => 'Bar' );
-my $bar_composite = Clownfish::CFC::Type->new_composite(
+my $bar_type = Clownfish::CFC::Model::Type->new_object( specifier => 'Bar' );
+my $bar_composite = Clownfish::CFC::Model::Type->new_composite(
     child       => $bar_type,
     indirection => 1,
 );

Modified: incubator/lucy/trunk/clownfish/perl/t/300-variable.t
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/t/300-variable.t?rev=1300684&r1=1300683&r2=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/t/300-variable.t (original)
+++ incubator/lucy/trunk/clownfish/perl/t/300-variable.t Wed Mar 14 18:42:22 
2012
@@ -17,8 +17,6 @@ use strict;
 use warnings;
 
 use Test::More tests => 13;
-use Clownfish::CFC::Type;
-use Clownfish::CFC::Parser;
 
 BEGIN { use_ok('Clownfish::CFC::Variable') }
 

Modified: incubator/lucy/trunk/clownfish/perl/t/301-param_list.t
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/t/301-param_list.t?rev=1300684&r1=1300683&r2=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/t/301-param_list.t (original)
+++ incubator/lucy/trunk/clownfish/perl/t/301-param_list.t Wed Mar 14 18:42:22 
2012
@@ -19,8 +19,6 @@ use warnings;
 use Test::More tests => 13;
 
 BEGIN { use_ok('Clownfish::CFC::ParamList') }
-use Clownfish::CFC::Type;
-use Clownfish::CFC::Parser;
 
 my $parser = Clownfish::CFC::Parser->new;
 $parser->parse('parcel Neato;')

Modified: incubator/lucy/trunk/clownfish/perl/t/600-parser.t
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/t/600-parser.t?rev=1300684&r1=1300683&r2=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/t/600-parser.t (original)
+++ incubator/lucy/trunk/clownfish/perl/t/600-parser.t Wed Mar 14 18:42:22 2012
@@ -45,7 +45,7 @@ for (qw( void float uint32_t int64_t uin
 }
 
 isa_ok( $parser->parse("bool_t"),
-    "Clownfish::CFC::Type", "Charmony integer specifier bool_t" );
+    "Clownfish::CFC::Model::Type", "Charmony integer specifier bool_t" );
 
 is( $parser->parse("$_*")->get_specifier,
     "crust_$_", "object_type_specifier $_" )
@@ -56,7 +56,7 @@ ok( $parser->parse("const char")->const,
 ok( $parser->parse("$_ int32_t foo;")->$_, "exposure_specifier $_" )
     for qw( public private parcel );
 
-isa_ok( $parser->parse($_), "Clownfish::CFC::Type", "type $_" )
+isa_ok( $parser->parse($_), "Clownfish::CFC::Model::Type", "type $_" )
     for ( 'const char *', 'Obj*', 'i32_t', 'char[]', 'long[1]', 'i64_t[30]' );
 
 is( $parser->parse("(int32_t foo = $_)")->get_initial_values->[0],

Modified: incubator/lucy/trunk/clownfish/perl/typemap
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/typemap?rev=1300684&r1=1300683&r2=1300684&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/typemap (original)
+++ incubator/lucy/trunk/clownfish/perl/typemap Wed Mar 14 18:42:22 2012
@@ -28,7 +28,7 @@ CFCParamList* CLOWNFISH_TYPE
 CFCParcel*     CLOWNFISH_TYPE
 CFCParser*     CLOWNFISH_TYPE
 CFCSymbol*     CLOWNFISH_TYPE
-CFCType*       CLOWNFISH_TYPE
+CFCType*       CLOWNFISH_MODEL
 CFCVariable*   CLOWNFISH_TYPE
 CFCBindCore*   CLOWNFISH_BINDING_CORE
 CFCBindClass*  CLOWNFISH_BINDING_CORE_TYPE
@@ -41,6 +41,18 @@ CFCPerlPod*  CLOWNFISH_BINDING_PERL_COMMO
 
 INPUT
 
+CLOWNFISH_MODEL
+       if (!SvOK($arg)) {
+        $var = NULL;
+    }
+       else if (sv_derived_from($arg, \"${(my $t = $type) =~ 
s/CFC(\w+).*/Clownfish::CFC::Model::$1/;\$t}\")) {
+               IV objint = SvIV((SV*)SvRV($arg));
+               $var = INT2PTR($type, objint);
+       }
+    else {
+               croak(\"Not a ${(my $t = $type) =~ 
s/CFC(\w+).*/Clownfish::CFC::Model::$1/;\$t}\");
+       }
+
 CLOWNFISH_TYPE
        if (!SvOK($arg)) {
         $var = NULL;
@@ -117,6 +129,9 @@ CLOWNFISH_BINDING_PERL_COMMON
 
 OUTPUT
 
+CLOWNFISH_MODEL
+       sv_setref_pv($arg, \"${(my $t = $type) =~ 
s/CFC(\w+).*/Clownfish::CFC::Model::$1/;\$t}\", (void*)$var);
+
 CLOWNFISH_TYPE
        sv_setref_pv($arg, \"${(my $t = $type) =~ 
s/CFC(\w+).*/Clownfish::CFC::$1/;\$t}\", (void*)$var);
 


Reply via email to