Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
e9fd04b4
Commit
e9fd04b4
authored
Mar 21, 2015
by
Marius Wachtler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix strange slice GC issue
Looks like allocating the BoxedSlice before the arguments caused a issue?!?
parent
0c49d8ec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
src/runtime/capi.cpp
src/runtime/capi.cpp
+1
-1
src/runtime/list.cpp
src/runtime/list.cpp
+3
-2
No files found.
src/runtime/capi.cpp
View file @
e9fd04b4
...
...
@@ -447,7 +447,7 @@ extern "C" PyObject* PySequence_GetItem(PyObject* o, Py_ssize_t i) noexcept {
extern
"C"
PyObject
*
PySequence_GetSlice
(
PyObject
*
o
,
Py_ssize_t
i1
,
Py_ssize_t
i2
)
noexcept
{
try
{
// Not sure if this is really the same:
return
getitem
(
o
,
new
Boxed
Slice
(
boxInt
(
i1
),
boxInt
(
i2
),
None
));
return
getitem
(
o
,
create
Slice
(
boxInt
(
i1
),
boxInt
(
i2
),
None
));
}
catch
(
ExcInfo
e
)
{
Py_FatalError
(
"unimplemented"
);
}
...
...
src/runtime/list.cpp
View file @
e9fd04b4
...
...
@@ -785,10 +785,11 @@ extern "C" int PyList_SetSlice(PyObject* a, Py_ssize_t ilow, Py_ssize_t ihigh, P
ASSERT
(
isSubclass
(
l
->
cls
,
list_cls
),
"%s"
,
l
->
cls
->
tp_name
);
try
{
BoxedSlice
*
slice
=
(
BoxedSlice
*
)
createSlice
(
boxInt
(
ilow
),
boxInt
(
ihigh
),
None
);
if
(
v
)
listSetitemSlice
(
l
,
new
BoxedSlice
(
boxInt
(
ilow
),
boxInt
(
ihigh
),
None
)
,
v
);
listSetitemSlice
(
l
,
slice
,
v
);
else
listDelitemSlice
(
l
,
new
BoxedSlice
(
boxInt
(
ilow
),
boxInt
(
ihigh
),
None
)
);
listDelitemSlice
(
l
,
slice
);
return
0
;
}
catch
(
ExcInfo
e
)
{
setCAPIException
(
e
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment