Skip to content

Commit 422a9e9

Browse files
committed
BuiltinConstructors: do not convert __slots__ to list when set a string
This reverts commit fb2157eac0e474d30dfe027bc25a4266c1f2d8a1.
1 parent ea37718 commit 422a9e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/BuiltinConstructors.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2356,8 +2356,8 @@ private PythonClass typeMetaclass(VirtualFrame frame, PythonLanguage language, S
23562356
SequenceStorage slotsStorage;
23572357
Object slotsObject;
23582358
if (slots[0] instanceof String) {
2359-
slotsObject = factory().createList(slots);
2360-
slotsStorage = ((PList) slotsObject).getSequenceStorage();
2359+
slotsObject = slots[0];
2360+
slotsStorage = new ObjectSequenceStorage(slots);
23612361
} else if (slots[0] instanceof PTuple) {
23622362
slotsObject = slots[0];
23632363
slotsStorage = ((PTuple) slots[0]).getSequenceStorage();

0 commit comments

Comments
 (0)