[libinline-java-perl] 337/398: ok, v0.50

Jonas Smedegaard dr at jones.dk
Thu Feb 26 11:43:20 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 21813eb84d28872e47c928018f99a713251a7cc4
Author: patrick_leb <>
Date:   Tue Feb 1 01:16:47 2005 +0000

    ok, v0.50
---
 CHANGES                         |  5 +++++
 Java.pm                         | 45 +++++++++++++++++++++++------------------
 Java/JVM.pm                     |  4 ++--
 Java/PerlNatives/PerlNatives.xs |  4 ++--
 Java/Portable.pm                | 14 ++++++++-----
 README                          |  2 +-
 6 files changed, 44 insertions(+), 30 deletions(-)

diff --git a/CHANGES b/CHANGES
index f160f3f..e131179 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,10 @@
 Revision history for Perl extension Inline::Java
 ------------------------------------------------
+0.50  Mon Jan 31 20:14:43 EST 2005
+    - Added HOST configuration option to access JVM server remotely
+    - Fixed bug with paths in Cygwin
+    - Other minor bug fixes
+
 0.49  
     - Added PerlInterpreter: require/eval Perl code directly from Java
     - Reworked type casting: changes are NOT backwards compatible :(
diff --git a/Java.pm b/Java.pm
index 4a89510..36e0efe 100644
--- a/Java.pm
+++ b/Java.pm
@@ -8,7 +8,7 @@ package Inline::Java ;
 use strict ;
 require 5.006 ;
 
-$Inline::Java::VERSION = '0.49' ;
+$Inline::Java::VERSION = '0.50' ;
 
 
 # DEBUG is set via the DEBUG config
@@ -131,27 +131,28 @@ sub validate {
 	my $jdk = Inline::Java::get_default_j2sdk() ;
 	my $dbg = $Inline::Java::DEBUG ;
 	my %opts = @_ ;
-	$o->set_option('DEBUG',					$dbg,	'i', 1, \%opts) ;
-	$o->set_option('J2SDK',					$jdk,	's', 1, \%opts) ;
-	$o->set_option('CLASSPATH',				'',		's', 1, \%opts) ;
+	$o->set_option('DEBUG',					$dbg,			'i', 1, \%opts) ;
+	$o->set_option('J2SDK',					$jdk,			's', 1, \%opts) ;
+	$o->set_option('CLASSPATH',				'',				's', 1, \%opts) ;
 
-	$o->set_option('PORT',					-1,		'i', 1, \%opts) ;
-	$o->set_option('STARTUP_DELAY',			15,		'i', 1, \%opts) ;
-	$o->set_option('SHARED_JVM',			0,		'b', 1, \%opts) ;
-	$o->set_option('START_JVM',				1,		'b', 1, \%opts) ;
-	$o->set_option('JNI',					0,		'b', 1, \%opts) ;
-	$o->set_option('EMBEDDED_JNI',			0,		'b', 1, \%opts) ;
+	$o->set_option('HOST',					'localhost',	's', 1, \%opts) ;
+	$o->set_option('PORT',					-1,				'i', 1, \%opts) ;
+	$o->set_option('STARTUP_DELAY',			15,				'i', 1, \%opts) ;
+	$o->set_option('SHARED_JVM',			0,				'b', 1, \%opts) ;
+	$o->set_option('START_JVM',				1,				'b', 1, \%opts) ;
+	$o->set_option('JNI',					0,				'b', 1, \%opts) ;
+	$o->set_option('EMBEDDED_JNI',			0,				'b', 1, \%opts) ;
 
-	$o->set_option('WARN_METHOD_SELECT',	0,		'b', 1, \%opts) ;
-	$o->set_option('STUDY',					undef,	'a', 0, \%opts) ;
-	$o->set_option('AUTOSTUDY',				0,		'b', 1, \%opts) ;
+	$o->set_option('WARN_METHOD_SELECT',	0,				'b', 1, \%opts) ;
+	$o->set_option('STUDY',					undef,			'a', 0, \%opts) ;
+	$o->set_option('AUTOSTUDY',				0,				'b', 1, \%opts) ;
 
-	$o->set_option('EXTRA_JAVA_ARGS',		'',		's', 1, \%opts) ;
-	$o->set_option('EXTRA_JAVAC_ARGS',		'',		's', 1, \%opts) ;
-	$o->set_option('DEBUGGER',				0,		'b', 1, \%opts) ;
+	$o->set_option('EXTRA_JAVA_ARGS',		'',				's', 1, \%opts) ;
+	$o->set_option('EXTRA_JAVAC_ARGS',		'',				's', 1, \%opts) ;
+	$o->set_option('DEBUGGER',				0,				'b', 1, \%opts) ;
 
-	$o->set_option('PRIVATE',				'',		'b', 1, \%opts) ;
-	$o->set_option('PACKAGE',				'',		's', 1, \%opts) ;
+	$o->set_option('PRIVATE',				'',				'b', 1, \%opts) ;
+	$o->set_option('PACKAGE',				'',				's', 1, \%opts) ;
 
 	my @left_overs = keys(%opts) ;
 	if (scalar(@left_overs)){
@@ -181,6 +182,9 @@ sub validate {
 	if (($o->get_java_config('JNI'))&&($o->get_java_config('DEBUGGER'))){
 		croak("You can't invoke the Java debugger ('DEBUGGER' option) in 'JNI' mode") ;
 	}
+	if ((! $o->get_java_config('SHARED_JVM'))&&(! $o->get_java_config('START_JVM'))){
+		croak("Disabling the 'START_JVM' option only makes sense in 'SHARED_JVM' mode") ;
+	}
 
 	if ($o->get_java_config('JNI')){
 		require Inline::Java::JNI ;
@@ -356,8 +360,9 @@ sub build {
 		$ENV{CLASSPATH} = Inline::Java::Portable::make_classpath($server_jar, @prev_install_dirs, $o->get_java_config('CLASSPATH')) ;
 		Inline::Java::debug(2, "classpath: $ENV{CLASSPATH}") ;
 		my $args = "-deprecation " . $o->get_java_config('EXTRA_JAVAC_ARGS') ;
+		my $pinstall_dir = Inline::Java::Portable::portable("SUB_FIX_JAVA_PATH", $install_dir) ;
 		my $cmd = Inline::Java::Portable::portable("SUB_FIX_CMD_QUOTES", 
-			"\"$javac\" $args -d \"$install_dir\" $source > cmd.out $redir") ;
+			"\"$javac\" $args -d \"$pinstall_dir\" $source > cmd.out $redir") ;
 		if ($o->get_config('UNTAINT')){
 			($cmd) = $cmd =~ /(.*)/ ;
 		}
@@ -474,7 +479,7 @@ sub load {
 		Inline::Java::debug(2, "classpath: $ENV{CLASSPATH}") ;
 
 		my $pc = new Inline::Java::Protocol(undef, $o) ;
-		$pc->AddClassPath(Inline::Java::Portable::portable("SUB_FIX_CLASSPATH", Inline::Java::Portable::get_user_jar())) ;
+		$pc->AddClassPath(Inline::Java::Portable::portable("SUB_FIX_JAVA_PATH", Inline::Java::Portable::get_user_jar())) ;
 
 		my $st = $pc->ServerType() ;
 		if ((($st eq "shared")&&(! $o->get_java_config('SHARED_JVM')))||
diff --git a/Java/JVM.pm b/Java/JVM.pm
index ec451de..bd731e7 100644
--- a/Java/JVM.pm
+++ b/Java/JVM.pm
@@ -8,7 +8,7 @@ use IPC::Open3 ;
 use IO::Socket ;
 use Inline::Java::Portable ;
 
-$Inline::Java::JVM::VERSION = '0.49' ;
+$Inline::Java::JVM::VERSION = '0.50' ;
 
 my %SIGS = () ;
 
@@ -65,7 +65,7 @@ sub new {
 		$this->{shared} = $o->get_java_config('SHARED_JVM') ;
 		$this->{start_jvm} = $o->get_java_config('START_JVM') ;
 		$this->{port} = $o->get_java_config('PORT') ;
-		$this->{host} = "localhost" ;
+		$this->{host} = $o->get_java_config('HOST') ;
 
 		# Grab the next free port number and release it.
 		if ((! $this->{shared})&&($this->{port} < 0)){
diff --git a/Java/PerlNatives/PerlNatives.xs b/Java/PerlNatives/PerlNatives.xs
index 81348e0..4610919 100644
--- a/Java/PerlNatives/PerlNatives.xs
+++ b/Java/PerlNatives/PerlNatives.xs
@@ -73,7 +73,7 @@ jobject extract_va_arg(JNIEnv *env, va_list *list, char f){
 
 	/*
 		A bit of voodoo going on for J and F, but the rest I think is pretty
-		kosher (on a 32 bit machine at least)
+		kosher (on a 32 bit machine at least...)
 	*/
 	switch(f){
 		case 'B':
@@ -102,7 +102,7 @@ jobject extract_va_arg(JNIEnv *env, va_list *list, char f){
 			ret = create_primitive_object(env, f, "java/lang/Double", val) ;
 			break ;
 		case 'Z':
-			val.z = (jint)va_arg(*list, int) ;
+			val.z = (jboolean)va_arg(*list, int) ;
 			ret = create_primitive_object(env, f, "java/lang/Boolean", val) ;
 			break ;
 		case 'C':
diff --git a/Java/Portable.pm b/Java/Portable.pm
index a902eec..be6da16 100644
--- a/Java/Portable.pm
+++ b/Java/Portable.pm
@@ -9,7 +9,7 @@ use Config ;
 use File::Find ;
 use File::Spec ;
 
-$Inline::Java::Portable::VERSION = '0.49' ;
+$Inline::Java::Portable::VERSION = '0.50' ;
 
 # Here is some code to figure out if we are running on command.com
 # shell under Windows.
@@ -61,7 +61,7 @@ sub make_classpath {
 		if (($p)&&(-e $p)){
 			if ($cp{$p}){
 				my $fp = (-d $p ? File::Spec->rel2abs($p) : $p) ;
-				push @fcp, Inline::Java::Portable::portable("SUB_FIX_CLASSPATH", $fp) ;
+				push @fcp, Inline::Java::Portable::portable("SUB_FIX_JAVA_PATH", $fp) ;
 				delete $cp{$p} ;
 			}
 		}
@@ -152,7 +152,7 @@ sub portable {
 		MAKE				=>	'make',
 		DEV_NULL			=>  '/dev/null',
 		COMMAND_COM			=>  0,
-		SUB_FIX_CLASSPATH	=>	undef,
+		SUB_FIX_JAVA_PATH	=>	undef,
 		SUB_FIX_CMD_QUOTES	=>	undef,
 		SUB_FIX_MAKE_QUOTES	=>	undef,
 		JVM_LIB				=>	"libjvm.$Config{dlext}",
@@ -197,7 +197,7 @@ sub portable {
 		},
 		cygwin => {
 			ENV_VAR_PATH_SEP_CP	=>	';',
-			SUB_FIX_CLASSPATH	=>	sub {
+			SUB_FIX_JAVA_PATH	=>	sub {
 				my $val = shift ;
 				if (defined($val)&&($val)){
 					$val = `cygpath -w \"$val\"` ;
@@ -219,7 +219,11 @@ sub portable {
 		aix => {
 			JVM_LIB				=>	"libjvm$Config{lib_ext}",
 			JVM_SO				=>	"libjvm$Config{lib_ext}",
-		}
+		},
+		darwin => {
+			# Suggested by Ken Williams, mailing list 2004/07/07
+			SO_EXT				=>	$Config{so},
+		},
 	} ;
 
 	if (! exists($defmap->{$key})){
diff --git a/README b/README
index 81321e7..42aa6f1 100644
--- a/README
+++ b/README
@@ -92,4 +92,4 @@ Inline::Java's home page is http://inline.perl.org/java/.
 
 Please send questions and comments to Patrick LeBoutillier <patl at cpan.org>.
 
-Copyright (c) 2001-2004, Patrick LeBoutillier. All Rights Reserved.  
+Copyright (c) 2001-2005, Patrick LeBoutillier. All Rights Reserved.  

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