bzrlib/_annotator_pyx.c:1859: error: ‘PyListObject’ has no member named ‘ob_item’
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
New
|
Undecided
|
Unassigned |
Bug Description
PyListObject should be opaque, e.g. nothing should try to access "ob_item"
This breaks compatibility with PyPy which chokes on that.
Instead it should use macros/functions PyList_GET_ITEM / PyList_SetItem
http://
ctypedef struct PyListObject:
PyObject **ob_item
...
cdef int _apply_
"""Apply the annotations from parent_annotations into annotations.
matching_blocks defines the ranges that match.
"""
cdef Py_ssize_t parent_idx, lines_idx, match_len, idx
cdef PyListObject *par_list, *ann_list
cdef PyObject **par_temp, **ann_temp
_check_
par_list = <PyListObject *>parent_
ann_list = <PyListObject *>annotations
# For NEWS and bzrlib/builtins.py, over 99% of the lines are simply copied
# across from the parent entry. So this routine is heavily optimized for
# that. Would be interesting if we could use memcpy() but we have to incref
# and decref
for parent_idx, lines_idx, match_len in matching_blocks:
par_temp = par_list.ob_item + parent_idx
ann_temp = ann_list.ob_item + lines_idx
for idx from 0 <= idx < match_len:
return 0
-------
PyListObject should be opaque, e.g. nothing should try to access "ob_item"
This breaks compatibility with PyPy which chokes on that.
Instead it should use macros/functions PyList_GET_ITEM / PyList_SetItem
e.g. something like
for parent_idx, lines_idx, match_len in matching_blocks:
for idx from 0 <= idx < match_len:
temp = PyList_
ann = <object>temp
tags: | added: check-for-breezy |