[libinline-java-perl] 272/398: ok
Jonas Smedegaard
dr at jones.dk
Thu Feb 26 11:43:13 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.55
in repository libinline-java-perl.
commit 36e2bb084628408ebd8cb2e3bc0aec2a5bec352a
Author: patrick_leb <>
Date: Tue Jan 20 00:12:45 2004 +0000
ok
---
Java.pm | 14 ++++++++++++--
Makefile.PL | 23 +++++++++--------------
2 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/Java.pm b/Java.pm
index ea3a114..5912fdd 100644
--- a/Java.pm
+++ b/Java.pm
@@ -593,12 +593,16 @@ sub load_jdat {
my $current_class = undef ;
foreach my $line (@{$lines}){
chomp($line) ;
- if ($line =~ /^class ($re)$/){
+ if ($line =~ /^class ($re) ($re|null)$/){
# We found a class definition
my $java_class = $1 ;
+ my $parent_java_class = $2 ;
$current_class = Inline::Java::java2perl($o->get_api('pkg'), $java_class) ;
$d->{classes}->{$current_class} = {} ;
$d->{classes}->{$current_class}->{java_class} = $java_class ;
+ if ($parent_java_class ne "null"){
+ $d->{classes}->{$current_class}->{parent_java_class} = $parent_java_class ;
+ }
$d->{classes}->{$current_class}->{constructors} = {} ;
$d->{classes}->{$current_class}->{methods} = {} ;
$d->{classes}->{$current_class}->{fields} = {} ;
@@ -674,18 +678,24 @@ sub bind_jdat {
$class_name =~ s/^(.*)::// ;
my $java_class = $d->{classes}->{$class}->{java_class} ;
+ my $parent_java_class = $d->{classes}->{$class}->{parent_java_class} ;
+ my $parent_module = '' ;
+ if (defined($parent_java_class)){
+ $parent_module = java2perl($o->get_api('pkg'), $parent_java_class) . ' ' ;
+ }
if (Inline::Java::known_to_perl($o->get_api('pkg'), $java_class)){
next ;
}
my $colon = ":" ;
my $dash = "-" ;
+ my $ijo = 'Inline::Java::Object' ;
my $code = <<CODE;
package $class ;
use vars qw(\@ISA \$INLINE \$EXISTS \$JAVA_CLASS \$DUMMY_OBJECT) ;
-\@ISA = qw(Inline::Java::Object) ;
+\@ISA = qw($parent_module$ijo) ;
\$INLINE = \$INLINES[$inline_idx] ;
\$EXISTS = 1 ;
\$JAVA_CLASS = '$java_class' ;
diff --git a/Makefile.PL b/Makefile.PL
index b67e92a..61d18a1 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -7,8 +7,6 @@ use Cwd ;
require "Java/Portable.pm" ;
-$main::build_jni = 'false' ;
-
print "\nWelcome to the Inline::Java installation procedure.\n\n" ;
# Grab the J2SDK argument
@@ -56,7 +54,7 @@ foreach my $f ('javac', 'jar', 'java'){
}
-# Now we have the J2SDK directory and it exists.
+# Now we have the J2SDK directory and it exists.
# We will create the default_j2sdk.pl file that
# will contain that value for future use.
my $def_jdk = File::Spec->catfile('Java', 'default_j2sdk.pl') ;
@@ -169,25 +167,22 @@ WriteMakefile(
# Create the properties that will be included in the jar.
-my @jni_so_parts = ("auto", "Inline", "Java", "JNI",
- "JNI." . Inline::Java::Portable::portable('SO_EXT')) ;
-my $install_jni_so = File::Spec->catfile($INSTALLSITEARCH, @jni_so_parts) ;
-my $test_jni_so = File::Spec->rel2abs(File::Spec->catfile($INST_ARCHLIB, @jni_so_parts)) ;
-my $libperl_so = File::Spec->catfile($Config{installarchlib}, 'CORE',
- Inline::Java::Portable::portable('LIBPERL')) ;
+my @natives_so_parts = ("auto", "Inline", "Java", "Natives",
+ "Natives." . Inline::Java::Portable::portable('SO_EXT')) ;
+my $install_natives_so = File::Spec->catfile($INSTALLSITEARCH, @natives_so_parts) ;
+$install_natives_so =~ s/\\/\\\\/g ;
+my $test_natives_so = File::Spec->rel2abs(File::Spec->catfile($INST_ARCHLIB, @natives_so_parts)) ;
+$test_natives_so =~ s/\\/\\\\/g ;
my $prop = File::Spec->catfile($obj_dir, 'InlineJava.properties') ;
open(PROP, ">$prop") or
die("Can't open '$prop' for writing: $!") ;
print PROP <<PROP;
# This file is created by the Makefile.PL for Inline::Java
-jni_so_built = $main::build_jni
-inline_java_jni_so_install = $install_jni_so
-inline_java_jni_so_test = $test_jni_so
-libperl_so = $libperl_so
+inline_java_natives_so_install = $install_natives_so
+inline_java_natives_so_test = $test_natives_so
PROP
close(PROP) ;
-
# Clean up the Makefile for Win95/98/Me
if (Inline::Java::Portable::portable('COMMAND_COM')){
print "\nFixing Makefile for Win95/98/Me...\n" ;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libinline-java-perl.git
More information about the Pkg-perl-cvs-commits
mailing list