[libinline-java-perl] 275/398: ok

Jonas Smedegaard dr at jones.dk
Thu Feb 26 11:43:14 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 943b20893dc55cb54ff80b3037e3409f7a480498
Author: patrick_leb <>
Date:   Tue Jan 20 01:17:08 2004 +0000

    ok
---
 Java.pm          | 8 +++++++-
 Java/Callback.pm | 2 +-
 Java/Makefile.PL | 8 +++++++-
 Java/Portable.pm | 2 ++
 4 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/Java.pm b/Java.pm
index 5912fdd..c64667c 100644
--- a/Java.pm
+++ b/Java.pm
@@ -678,10 +678,15 @@ sub bind_jdat {
 		$class_name =~ s/^(.*)::// ;
 
 		my $java_class = $d->{classes}->{$class}->{java_class} ;
+		# This parent stuff is needed for PerlNatives (so that you can call PerlNatives methods
+		# from Perl...)
 		my $parent_java_class = $d->{classes}->{$class}->{parent_java_class} ;
 		my $parent_module = '' ;
+		my $parent_module_declare = '' ;
 		if (defined($parent_java_class)){
-			$parent_module = java2perl($o->get_api('pkg'), $parent_java_class) . ' ' ;
+			$parent_module = java2perl($o->get_api('pkg'), $parent_java_class) ;
+			$parent_module_declare = "\$$parent_module" . "::EXISTS_AS_PARENT = 1 ;" ;
+			$parent_module .= ' ' ;
 		}
 		if (Inline::Java::known_to_perl($o->get_api('pkg'), $java_class)){
 			next ;
@@ -695,6 +700,7 @@ sub bind_jdat {
 package $class ;
 use vars qw(\@ISA \$INLINE \$EXISTS \$JAVA_CLASS \$DUMMY_OBJECT) ;
 
+$parent_module_declare
 \@ISA = qw($parent_module$ijo) ;
 \$INLINE = \$INLINES[$inline_idx] ;
 \$EXISTS = 1 ;
diff --git a/Java/Callback.pm b/Java/Callback.pm
index fdca596..a0fa57f 100644
--- a/Java/Callback.pm
+++ b/Java/Callback.pm
@@ -27,7 +27,7 @@ sub InterceptCallback {
 
 		# "Relative" namespace...
 		if ($module =~ /^::/){
-			$module = $inline->{pkg} . $module ;
+			$module = $inline->get_api('pkg') . $module ;
 		}
 
 		return Inline::Java::Callback::ProcessCallback($inline, $module, $function, $cast_return, @args) ;
diff --git a/Java/Makefile.PL b/Java/Makefile.PL
index f3c0870..799f9dc 100644
--- a/Java/Makefile.PL
+++ b/Java/Makefile.PL
@@ -65,7 +65,13 @@ if (($build_jni || AskYN("Do you wish to build the JNI extension?", 'y'))){
 
 	$jdk_dir = Inline::Java::get_default_j2sdk() ;
 
-	find({wanted => \&search, follow => 1, follow_skip => 2}, $jdk_dir) ;
+	my $symlink = Inline::Java::Portable::portable("GOT_SYMLINK") ;
+	find(
+		{
+			wanted => \&search,
+			($symlink ? (follow => 1, follow_skip => 2) : ()),
+		},
+		$jdk_dir) ;
 
 	my $type = FindDefaultVMType() ;
 	if (defined($type)){
diff --git a/Java/Portable.pm b/Java/Portable.pm
index 1421b97..27e98be 100644
--- a/Java/Portable.pm
+++ b/Java/Portable.pm
@@ -140,6 +140,7 @@ sub portable {
 		GOT_ALARM			=>  $Config{d_alarm} || 0,
 		GOT_FORK			=>	$Config{d_fork} || 0,
 		GOT_NEXT_FREE_PORT	=>	1,
+		GOT_SYMLINK			=>	1,
 		ENV_VAR_PATH_SEP	=>	$Config{path_sep},
 		SO_EXT				=>	$Config{dlext},
 		PREFIX				=>	$Config{prefix},
@@ -171,6 +172,7 @@ sub portable {
 			JVM_LIB				=>	'jvm.lib',
 			JVM_SO				=>	'jvm.dll',
 			GOT_NEXT_FREE_PORT	=>	0,
+			GOT_SYMLINK			=>	0,
 			SUB_FIX_CMD_QUOTES	=>	($COMMAND_COM ? undef : sub {
 				my $val = shift ;
 				$val = qq{"$val"} ;

-- 
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