[libinline-java-perl] 366/398: backwards compatibility with perl 5.6

Jonas Smedegaard dr at jones.dk
Thu Feb 26 11:43:25 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 d878d9f726e1aff24959f0d941ac98a4e8f71414
Author: patrick_leb <>
Date:   Sat Jan 21 14:27:56 2006 +0000

    backwards compatibility with perl 5.6
---
 Java/JNI.xs | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Java/JNI.xs b/Java/JNI.xs
index 308acc5..05fd985 100644
--- a/Java/JNI.xs
+++ b/Java/JNI.xs
@@ -135,7 +135,7 @@ InlineJavaJNIVM *
 new(CLASS, classpath, args, embedded, debug, native_doubles)
 	char * CLASS
 	char * classpath
-	AV * args
+	SV * args
 	int	embedded
 	int	debug
 	int	native_doubles
@@ -153,6 +153,7 @@ new(CLASS, classpath, args, embedded, debug, native_doubles)
 	STRLEN n_a ;
 
     CODE:
+	args = SvRV(args) ;
 	RETVAL = (InlineJavaJNIVM *)safemalloc(sizeof(InlineJavaJNIVM)) ;
 	if (RETVAL == NULL){
 		croak("Can't create InlineJavaJNIVM") ;
@@ -164,7 +165,7 @@ new(CLASS, classpath, args, embedded, debug, native_doubles)
 	RETVAL->destroyed = 0 ;
 
 	/* Figure out the length of the  args array */
-	args_len = av_len(args) + 1 ;
+	args_len = av_len((AV *)args) + 1 ;
 	vm_args.version = JNI_VERSION_1_2 ;
 	
 	options = (JavaVMOption *)malloc((2 + args_len) * sizeof(JavaVMOption)) ;
@@ -179,7 +180,7 @@ new(CLASS, classpath, args, embedded, debug, native_doubles)
 	options[vm_args.nOptions++].optionString = cp ;
 
 	for (i = 0 ; i < args_len ; i++){
-		val = av_fetch(args, i, 0) ;
+		val = av_fetch((AV *)args, i, 0) ;
 		if (val != NULL){
 			options[vm_args.nOptions++].optionString = SvPV(*val, n_a) ;
 		}

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