Permalink
Browse files

import version 0.54 from backpan

  • Loading branch information...
1 parent 9478256 commit 4c14c8b9fd3352b54cc4135a3ee800e18afeb09d @fperrad committed Sep 26, 2007
View
@@ -461,10 +461,10 @@
#define ALLOC_GET_out_CORBA_string(ptr,v) { \
CORBA_unsigned_long len; \
GET_CORBA_unsigned_long(ptr,&len); \
- v = CORBA_string__alloc(len); \
- if (NULL == (v)) goto err; \
- memcpy((v),ptr,len); \
- if ((v)[len-1] != '\0') goto err; \
+ *(v) = (CORBA_char *)CORBA_alloc(len); \
+ if (NULL == *(v)) goto err; \
+ memcpy(*(v),ptr,len); \
+ if ((*(v))[len-1] != '\0') goto err; \
ptr += len; \
PTR_ALIGN_CORBA_char(ptr); \
}
View
@@ -1,5 +1,8 @@
Revision history for Perl extension CORBA::XS.
+0.54 Wed Sep 26 12:30:00 2007
+ - reorg: more compliant with CPAN requirements
+
0.53 Tue Jul 19 18:30:00 2005
- new enum (CORBA::C)
View
@@ -2,12 +2,13 @@ Changes
Makefile.PL
MANIFEST
test.pl
-xs_c.pm
-c_cdr.pm
-c_skel.pm
-c_stub.pm
-pl_stub.pm
-idl2xs_c.pl
+lib/CORBA/XS.pm
+lib/CORBA/XS/xs_c.pm
+lib/CORBA/XS/c_cdr.pm
+lib/CORBA/XS/c_skel.pm
+lib/CORBA/XS/c_stub.pm
+lib/CORBA/XS/pl_stub.pm
+bin/idl2xs_c
C/corba.c
C/corba.h
C/cdr.h
@@ -29,5 +30,5 @@ example3/CalcCplx.idl
example3/skel_CalcCplx.c
example3/README
example3/testunit/test_cplx.pm
-
-META.yml Module meta-data (added by MakeMaker)
+
+META.yml Module meta-data (added by MakeMaker)
View
@@ -1,13 +1,13 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: CORBA-XS
-version: 0.53
-version_from: xs_c.pm
-installdirs: site
-requires:
- CORBA::C::include: 2.43
- CORBA::IDL::node: 2.45
- CORBA::Perl::cdr: 0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+# http://module-build.sourceforge.net/META-spec.html
+#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
+name: CORBA-XS
+version: 0.54
+version_from: lib/CORBA/XS.pm
+installdirs: site
+requires:
+ CORBA::C: 2.46
+ CORBA::IDL: 2.47
+ CORBA::Perl: 0
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.30
View
@@ -3,27 +3,30 @@ use ExtUtils::MakeMaker;
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'CORBA::XS',
- 'VERSION_FROM' => 'xs_c.pm',
+ 'VERSION_FROM' => 'lib/CORBA/XS.pm',
'ABSTRACT' => 'IDL compiler to extension interface between Perl and C code',
'PREREQ_PM' => {
- 'CORBA::IDL::node' => 2.45,
- 'CORBA::C::include' => 2.43,
- 'CORBA::Perl::cdr' => 0,
+ 'CORBA::IDL' => 2.47,
+ 'CORBA::C' => 2.46,
+ 'CORBA::Perl' => 0,
},
+ 'INSTALLDIRS' => 'site',
'PM' => {
- 'xs_c.pm' => '$(INST_LIBDIR)/XS/xs_c.pm',
- 'c_cdr.pm' => '$(INST_LIBDIR)/XS/c_cdr.pm',
- 'c_skel.pm' => '$(INST_LIBDIR)/XS/c_skel.pm',
- 'c_stub.pm' => '$(INST_LIBDIR)/XS/c_stub.pm',
- 'pl_stub.pm' => '$(INST_LIBDIR)/XS/pl_stub.pm',
- 'C/corba.c' => '$(INST_LIBDIR)/XS/corba.c',
- 'C/corba.h' => '$(INSTALLARCHLIB)/CORE/corba.h',
- 'C/cdr.h' => '$(INSTALLARCHLIB)/CORE/cdr.h'
+ 'lib/CORBA/XS.pm' => '$(INST_LIBDIR)/XS.pm',
+ 'lib/CORBA/XS/xs_c.pm' => '$(INST_LIBDIR)/XS/xs_c.pm',
+ 'lib/CORBA/XS/c_cdr.pm' => '$(INST_LIBDIR)/XS/c_cdr.pm',
+ 'lib/CORBA/XS/c_skel.pm' => '$(INST_LIBDIR)/XS/c_skel.pm',
+ 'lib/CORBA/XS/c_stub.pm' => '$(INST_LIBDIR)/XS/c_stub.pm',
+ 'lib/CORBA/XS/pl_stub.pm' => '$(INST_LIBDIR)/XS/pl_stub.pm',
+ 'C/corba.c' => '$(INST_LIBDIR)/XS/corba.c',
+ 'C/corba.h' => '$(INSTALLARCHLIB)/CORE/corba.h',
+ 'C/cdr.h' => '$(INSTALLARCHLIB)/CORE/cdr.h'
},
- 'EXE_FILES' => ['idl2xs_c.pl'],
+ 'EXE_FILES' => [ 'bin/idl2xs_c' ],
'AUTHOR' => "Francois PERRAD (francois.perrad\@gadz.org)",
'dist' => {
'COMPRESS' => 'gzip',
'SUFFIX' => '.gz',
},
);
+
@@ -1,9 +1,13 @@
#!/usr/bin/perl -w
use strict;
+use CORBA::IDL;
use CORBA::IDL::parser30;
use CORBA::IDL::symbtab;
# visitors
+use CORBA::C;
+use CORBA::Perl;
+use CORBA::XS;
use CORBA::IDL::repos_id;
use CORBA::C::literal;
use CORBA::C::name;
@@ -29,15 +33,16 @@
if ($^O eq 'MSWin32') {
$parser->YYData->{preprocessor} = 'cpp -C ' . $cflags;
# $parser->YYData->{preprocessor} = 'CL /E /C /nologo ' . $cflags; # Microsoft VC
-} else {
+}
+else {
$parser->YYData->{preprocessor} = 'cpp -C ' . $cflags;
}
-$parser->getopts("hi:J:vx");
+$parser->getopts('hi:J:vx');
if ($parser->YYData->{opt_v}) {
- print "CORBA::XS $CORBA::XS::xs_c::VERSION\n";
- print "CORBA::Perl $CORBA::Perl::cdr::VERSION\n";
- print "CORBA::C $CORBA::C::include::VERSION\n";
- print "CORBA::IDL $CORBA::IDL::node::VERSION\n";
+ print "CORBA::XS $CORBA::XS::VERSION\n";
+ print "CORBA::Perl $CORBA::Perl::VERSION\n";
+ print "CORBA::C $CORBA::C::VERSION\n";
+ print "CORBA::IDL $CORBA::IDL::VERSION\n";
print "IDL $Parser::IDL_version\n";
print "$0\n";
print "Perl $] on $^O\n";
@@ -318,7 +323,7 @@ =head1 SEE ALSO
=head1 COPYRIGHT
-(c) 2002-2004 Francois PERRAD, France. All rights reserved.
+(c) 2002-2007 Francois PERRAD, France. All rights reserved.
This program and all CORBA::XS modules are distributed
under the terms of the Artistic Licence.
View
@@ -0,0 +1,9 @@
+use strict;
+
+package CORBA::XS;
+
+use vars qw($VERSION);
+$VERSION = '0.54';
+
+1;
+
@@ -194,15 +194,15 @@ sub visitTypeDeclarator {
print $FH "\t\t\tFREE_inout_",$type->{c_name},"(",$node->{c_name},"_ptr);\\\n";
print $FH "\t\t}\\\n";
print $FH "\t}\n";
- print $FH "#define FREE_out_",$node->{c_name},"(v) {\\\n";
- print $FH "\t\t",$type->{c_name}," * ",$node->{c_name},"_ptr;\\\n";
- print $FH "\t\tfor (",$node->{c_name},"_ptr = &(*(v))" . $start . ";\\\n";
- print $FH "\t\t ",$node->{c_name},"_ptr < &(*(v))" . $start . " + (",$nb,");\\\n";
- print $FH "\t\t ",$node->{c_name},"_ptr++) {\\\n";
- print $FH "\t\t\tFREE_out_",$type->{c_name},"(",$node->{c_name},"_ptr);\\\n";
- print $FH "\t\t}\\\n";
- print $FH "\t}\n";
}
+ print $FH "#define FREE_out_",$node->{c_name},"(v) {\\\n";
+ print $FH "\t\t",$type->{c_name}," * ",$node->{c_name},"_ptr;\\\n";
+ print $FH "\t\tfor (",$node->{c_name},"_ptr = &(*(v))" . $start . ";\\\n";
+ print $FH "\t\t ",$node->{c_name},"_ptr < &(*(v))" . $start . " + (",$nb,");\\\n";
+ print $FH "\t\t ",$node->{c_name},"_ptr++) {\\\n";
+ print $FH "\t\t\tFREE_out_",$type->{c_name},"(",$node->{c_name},"_ptr);\\\n";
+ print $FH "\t\t}\\\n";
+ print $FH "\t}\n";
print $FH "#define FREE_",$node->{c_name},"(v) {\\\n";
print $FH "\t\t",$type->{c_name}," * ",$node->{c_name},"_ptr;\\\n";
print $FH "\t\tfor (",$node->{c_name},"_ptr = &(*(v))" . $start . ";\\\n";
@@ -237,8 +237,8 @@ sub visitTypeDeclarator {
} else {
print $FH "#define FREE_in_",$node->{c_name}," FREE_in_",$type->{c_name},"\n";
print $FH "#define FREE_inout_",$node->{c_name}," FREE_inout_",$type->{c_name},"\n";
- print $FH "#define FREE_out_",$node->{c_name}," FREE_out_",$type->{c_name},"\n";
}
+ print $FH "#define FREE_out_",$node->{c_name}," FREE_out_",$type->{c_name},"\n";
print $FH "#define FREE_",$node->{c_name}," FREE_",$type->{c_name},"\n";
} else {
if (exists $self->{client}) {
@@ -311,13 +311,13 @@ sub visitStructType {
print $FH "\t}\n";
print $FH "#define FREE_in_",$node->{c_name}," FREE_",$node->{c_name},"\n";
print $FH "#define FREE_inout_",$node->{c_name}," FREE_",$node->{c_name},"\n";
- print $FH "#define FREE_out_",$node->{c_name},"(v) {\\\n";
- print $FH "\t\tif (NULL != (v)) {\\\n";
- print $FH "\t\t\tFREE_",$node->{c_name},"(v);\\\n";
- print $FH "\t\t\tCORBA_free(v);\\\n";
- print $FH "\t}\\\n";
- print $FH "\t}\n";
}
+ print $FH "#define FREE_out_",$node->{c_name},"(v) {\\\n";
+ print $FH "\t\tif (NULL != (v)) {\\\n";
+ print $FH "\t\t\tFREE_",$node->{c_name},"(v);\\\n";
+ print $FH "\t\t\tCORBA_free(v);\\\n";
+ print $FH "\t}\\\n";
+ print $FH "\t}\n";
print $FH "#define FREE_",$node->{c_name},"(v) {\\\n";
print $FH $self->{free};
print $FH "\t}\n";
@@ -523,12 +523,12 @@ sub visitUnionType {
print $FH "\t}\n";
print $FH "#define FREE_in_",$node->{c_name}," FREE_",$node->{c_name},"\n";
print $FH "#define FREE_inout_",$node->{c_name}," FREE_",$node->{c_name},"\n";
- print $FH "#define FREE_out_",$node->{c_name},"(v) {\\\n";
- print $FH "\t\tif (NULL != (v)) {\\\n";
- print $FH "\t\t\tFREE_",$node->{c_name},"(v);\\\n";
- print $FH "\t\t\tCORBA_free(v);\\\n";
- print $FH "\t}\n";
}
+ print $FH "#define FREE_out_",$node->{c_name},"(v) {\\\n";
+ print $FH "\t\tif (NULL != (v)) {\\\n";
+ print $FH "\t\t\tFREE_",$node->{c_name},"(v);\\\n";
+ print $FH "\t\t\tCORBA_free(v);\\\n";
+ print $FH "\t}\n";
print $FH "#define FREE_",$node->{c_name},"(v) {\\\n";
print $FH "\t\tswitch ((v)->_d) {\\\n";
print $FH $self->{free};
@@ -710,13 +710,13 @@ sub visitSequenceType {
print $FH "\t}\n";
print $FH "#define FREE_in_",$node->{c_name}," FREE_",$node->{c_name},"\n";
print $FH "#define FREE_inout_",$node->{c_name}," FREE_",$node->{c_name},"\n";
- print $FH "#define FREE_out_",$node->{c_name},"(v) {\\\n";
- print $FH "\t\tif (NULL != (v)) {\\\n";
- print $FH "\t\t\tFREE_",$node->{c_name},"(v);\\\n";
- print $FH "\t\t\tCORBA_free(v);\\\n";
- print $FH "\t\t}\\\n";
- print $FH "\t}\n";
}
+ print $FH "#define FREE_out_",$node->{c_name},"(v) {\\\n";
+ print $FH "\t\tif (NULL != (v)) {\\\n";
+ print $FH "\t\t\tFREE_",$node->{c_name},"(v);\\\n";
+ print $FH "\t\t\tCORBA_free(v);\\\n";
+ print $FH "\t\t}\\\n";
+ print $FH "\t}\n";
print $FH "#define FREE_",$node->{c_name},"(v) {\\\n";
print $FH "\t\tif (NULL != (v)->_buffer) {\\\n";
if (defined $type->{length}) {
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -5,11 +5,6 @@ use POSIX qw(ctime);
# Interface Definition Language (OMG IDL CORBA v3.0)
#
-package CORBA::XS::xs_c;
-
-use vars qw($VERSION);
-$VERSION = '0.53';
-
package CORBA::XS::C_Visitor;
use File::Basename;
View
@@ -8,7 +8,7 @@
BEGIN { $| = 1; print "1..1\n"; }
END {print "not ok 1\n" unless $loaded;}
-use CORBA::XS::xs_c;
+use CORBA::XS;
$loaded = 1;
print "ok 1\n";

0 comments on commit 4c14c8b

Please sign in to comment.