Skip to content

Commit eff0da6

Browse files
qunaibitsteve-s
authored andcommitted
adjust capacity when internal storage array is replaced
1 parent e3c8497 commit eff0da6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/sequence/storage/ObjectSequenceStorage.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2022, Oracle and/or its affiliates.
2+
* Copyright (c) 2017, 2023, Oracle and/or its affiliates.
33
* Copyright (c) 2013, Regents of the University of California
44
*
55
* All rights reserved.
@@ -176,6 +176,7 @@ public Object getCopyOfInternalArrayObject() {
176176
@Override
177177
public void setInternalArrayObject(Object arrayObject) {
178178
this.values = (Object[]) arrayObject;
179+
this.capacity = values.length;
179180
assertContainsNoJavaString(values);
180181
}
181182

0 commit comments

Comments
 (0)