提交 be888ab6 authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix a crash following the new meaning of CudaNdarray.base to always point to the…

Fix a crash following the new meaning of CudaNdarray.base to always point to the variable that contain the data.
上级 67b628aa
...@@ -1664,9 +1664,9 @@ CudaNdarray_setitem(PyObject *o, PyObject *key, PyObject *value) ...@@ -1664,9 +1664,9 @@ CudaNdarray_setitem(PyObject *o, PyObject *key, PyObject *value)
!(((CudaNdarray*)rval)->base) || !(((CudaNdarray*)rval)->base) ||
// If the original array has no base, the base of the new // If the original array has no base, the base of the new
// array should be the original one // array should be the original one
(!((CudaNdarray*)o)->base && ((CudaNdarray*)rval)->base != o) (!((CudaNdarray*)o)->base && ((CudaNdarray*)rval)->base != o) ||
// Else, the two arrays should have the same base // Else, the two arrays should have the same base
|| ((CudaNdarray*)rval)->base != ((CudaNdarray*)o)->base)) (((CudaNdarray*)o)->base && ((CudaNdarray*)rval)->base != ((CudaNdarray*)o)->base)))
{ {
// This case shouldn't happen, based on what I see in Subscript // This case shouldn't happen, based on what I see in Subscript
// but just in case it happens sometime in the future // but just in case it happens sometime in the future
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论