From 20b5ab23012128e58b6e133ad7e6ca25c6b62f45 Mon Sep 17 00:00:00 2001 From: Peter Holloway Date: Tue, 26 Jul 2022 10:45:26 +0100 Subject: [PATCH 1/2] Support vararg constructors --- src/org/python/core/PyReflectedConstructor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/python/core/PyReflectedConstructor.java b/src/org/python/core/PyReflectedConstructor.java index 0dcdcebf5..103dad7d5 100644 --- a/src/org/python/core/PyReflectedConstructor.java +++ b/src/org/python/core/PyReflectedConstructor.java @@ -21,7 +21,7 @@ public PyReflectedConstructor(Constructor c) { } private ReflectedArgs makeArgs(Constructor m) { - return new ReflectedArgs(m, m.getParameterTypes(), m.getDeclaringClass(), true); + return new ReflectedArgs(m, m.getParameterTypes(), m.getDeclaringClass(), true, m.isVarArgs()); } public void addConstructor(Constructor m) { From 79a17386166c52cbf95f3e18fc553b5d6e715712 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Fri, 26 Aug 2022 17:46:41 +0100 Subject: [PATCH 2/2] Update NEWS for GH-201 --- NEWS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 4c4caec70..a408d4e22 100644 --- a/NEWS +++ b/NEWS @@ -19,9 +19,9 @@ New Features variable (GH-128). - Under PR GH-101, the matching of sequence arguments to the parameters of - Java methods is improved. A Java varargs parameter does not match a final - sequence in the call if an array parameter could do so. (Thanks Peter - Holloway.) + Java methods is improved (and in constructors under GH-201). A Java + varargs parameter does not match a final sequence in the call if an array + parameter could do so. (Thanks Peter Holloway.) - array.array itemsize of unsigned types is now the same as their signed counterparts, where previously it was mostly double. Internal @@ -39,7 +39,7 @@ New Features Jython 2.7.3b2-DEV Bugs fixed - - [ GH- ] + - [ GH-201 ] Support vararg constructors Jython 2.7.3b1 Bugs fixed - [ GH-192 ] PyString with non-byte value in formatting of collections