rpm-software-management / libcomps

Libcomps is alternative for yum.comps library. It's written in pure C as library and there's bindings for python2 and python3.
GNU General Public License v2.0
29 stars 37 forks source link

libcomps: Use Py_hash_t instead of long in PyCOMPS_hash() #101

Closed kraj closed 1 year ago

kraj commented 1 year ago

This function is used as a hashfunc callback in _typeobject defined python3.11/cpython/object.h compilers detect the protype mismatch for function pointers with clang16+

Fixes libcomps/src/python/src/pycomps_sequence.c:667:5: error: incompatible function pointer types initializing 'hashfunc' (aka 'int ()(struct _object )') with an expression of type 'long ()(PyObject )' (aka 'long ()(struct _object )') [-Wincompatible-function-pointer-types] &PyCOMPS_hash, /tp_hash /

kontura commented 1 year ago

Thanks