Skip to content

regression in lru #64

@totaam

Description

@totaam

The code now fails to build with Cython 3.1.2 on mingw, it looks like 2f019f9 broke something:

C:/msys64/mingw64/include/python3.12/cpython/odictobject.h:26:43: note: expected 'PyObject *' {aka 'struct _object *'} but argument is of type 'PyODictObject *' {aka 'struct _odictobject *'}
   26 | PyAPI_FUNC(int) PyODict_SetItem(PyObject *od, PyObject *key, PyObject *item);
      |                                 ~~~~~~~~~~^~
winloop/loop.c:79088:34: error: passing argument 1 of 'PyODict_SetItem' from incompatible pointer type [-Wincompatible-pointer-types]
79088 |     __pyx_t_3 = PyODict_SetItem(((PyODictObject *)__pyx_t_2), __pyx_v_key, __pyx_v_o); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(13, 163, __pyx_L1_error)
      |                                 ~^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                  |
      |                                  PyODictObject * {aka struct _odictobject *}
C:/msys64/mingw64/include/python3.12/cpython/odictobject.h:26:43: note: expected 'PyObject *' {aka 'struct _object *'} but argument is of type 'PyODictObject *' {aka 'struct _odictobject *'}
   26 | PyAPI_FUNC(int) PyODict_SetItem(PyObject *od, PyObject *key, PyObject *item);
      |                                 ~~~~~~~~~~^~
winloop/loop.c: In function '__pyx_pf_7winloop_4loop_8LruCache_6__delitem__':
winloop/loop.c:79180:32: error: passing argument 1 of 'PyODict_DelItem' from incompatible pointer type [-Wincompatible-pointer-types]
79180 |   __pyx_t_2 = PyODict_DelItem(((PyODictObject *)__pyx_t_1), __pyx_v_key); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(13, 168, __pyx_L1_error)
      |                               ~^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                |
      |                                PyODictObject * {aka struct _odictobject *}
C:/msys64/mingw64/include/python3.12/cpython/odictobject.h:27:43: note: expected 'PyObject *' {aka 'struct _object *'} but argument is of type 'PyODictObject *' {aka 'struct _odictobject *'}
   27 | PyAPI_FUNC(int) PyODict_DelItem(PyObject *od, PyObject *key);
      |                                 ~~~~~~~~~~^~
error: command 'C:\\msys64\\mingw64\\bin/gcc.EXE' failed with exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions