Skip to content

Commit

Permalink
Fix multiple ... generation
Browse files Browse the repository at this point in the history
  • Loading branch information
HGuillemet committed May 27, 2024
1 parent 9b5b017 commit 4b68052
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/bytedeco/javacpp/tools/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ void containers(Context context, DeclarationList declList) throws ParserExceptio
if (dim < 2 && !javaName.equals("int") && !javaName.equals("long")) {
decl.text += " public " + containerType.javaName + "(" + javaName + " value) { this(1); put(0, value); }\n";
}
decl.text += " public " + containerType.javaName + "(" + javaName + arrayBrackets + " ... array) { this(array.length); put(array); }\n";
decl.text += " public " + containerType.javaName + "(" + desugarVarargs(javaName) + arrayBrackets + " ... array) { this(array.length); put(array); }\n";
}
} else if (indexType == null && dim == 0 && !constant && !purify) {
int n = 0;
Expand Down Expand Up @@ -597,7 +597,7 @@ void containers(Context context, DeclarationList declList) throws ParserExceptio
+ " return put(0, value);\n"
+ " }\n";
}
decl.text += " public " + containerType.javaName + " put(" + javaName + arrayBrackets + " ... array) {\n";
decl.text += " public " + containerType.javaName + " put(" + desugarVarargs(javaName) + arrayBrackets + " ... array) {\n";
String indent = " ", indices = "", args = "";
separator = "";
for (int i = 0; i < dim; i++) {
Expand Down

0 comments on commit 4b68052

Please sign in to comment.