diff options
| author | 2026-03-30 20:21:22 +0200 | |
|---|---|---|
| committer | 2026-03-30 20:21:22 +0200 | |
| commit | f41b1ea67045e0c09339974d83e389972d84f166 (patch) | |
| tree | 65f479bb3a3c4718b4e5e32c70f70b6891b9c744 | |
| parent | c8b36a80bad4a1fe488927af4da0ecbcf10079bb (diff) | |
| download | libplist-f41b1ea67045e0c09339974d83e389972d84f166.tar.gz libplist-f41b1ea67045e0c09339974d83e389972d84f166.tar.bz2 | |
Fix Cython crashes
| -rw-r--r-- | cython/plist.pyx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cython/plist.pyx b/cython/plist.pyx index 29c1181..73912d8 100644 --- a/cython/plist.pyx +++ b/cython/plist.pyx | |||
| @@ -789,7 +789,10 @@ cdef class Array(Node): | |||
| 789 | return self._array.__iter__() | 789 | return self._array.__iter__() |
| 790 | 790 | ||
| 791 | def __getitem__(self, index): | 791 | def __getitem__(self, index): |
| 792 | return self._array[index] | 792 | value = self._array[index] |
| 793 | if isinstance(value, list): | ||
| 794 | return [item.copy() for item in value] | ||
| 795 | return value.copy() | ||
| 793 | 796 | ||
| 794 | def __setitem__(self, index, value): | 797 | def __setitem__(self, index, value): |
| 795 | cdef Node n | 798 | cdef Node n |
