diff options
author | Marek Szuba <marecki@gentoo.org> | 2023-08-20 13:50:29 +0100 |
---|---|---|
committer | Marek Szuba <marecki@gentoo.org> | 2023-08-20 13:51:44 +0100 |
commit | 0e656f10919ab3442cdbc868b932a1aa37d6d350 (patch) | |
tree | 624162f925070403ced86d60dc48f629eace0bc6 /dev-python/ruamel-yaml-clib | |
parent | dev-libs/libclc: Add 18.0.0_pre20230820 snapshot (diff) | |
download | gentoo-0e656f10919ab3442cdbc868b932a1aa37d6d350.tar.gz gentoo-0e656f10919ab3442cdbc868b932a1aa37d6d350.tar.bz2 gentoo-0e656f10919ab3442cdbc868b932a1aa37d6d350.zip |
dev-python/ruamel-yaml-clib: support building with -Werror=incompatible-function-pointer-types
Closes: https://bugs.gentoo.org/880651
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'dev-python/ruamel-yaml-clib')
-rw-r--r-- | dev-python/ruamel-yaml-clib/files/ruamel-yaml-clib-0.2.7_cython_pointer_types.patch | 75 | ||||
-rw-r--r-- | dev-python/ruamel-yaml-clib/ruamel-yaml-clib-0.2.7.ebuild | 4 |
2 files changed, 79 insertions, 0 deletions
diff --git a/dev-python/ruamel-yaml-clib/files/ruamel-yaml-clib-0.2.7_cython_pointer_types.patch b/dev-python/ruamel-yaml-clib/files/ruamel-yaml-clib-0.2.7_cython_pointer_types.patch new file mode 100644 index 000000000000..855571f05bb0 --- /dev/null +++ b/dev-python/ruamel-yaml-clib/files/ruamel-yaml-clib-0.2.7_cython_pointer_types.patch @@ -0,0 +1,75 @@ +--- a/_ruamel_yaml.pxd ++++ b/_ruamel_yaml.pxd +@@ -2,15 +2,15 @@ + cdef extern from "_ruamel_yaml.h": + + void malloc(int l) +- void memcpy(char *d, char *s, int l) ++ void memcpy(unsigned char *d, char *s, int l) + int strlen(char *s) + int PyString_CheckExact(object o) + int PyUnicode_CheckExact(object o) + char *PyString_AS_STRING(object o) + int PyString_GET_SIZE(object o) +- object PyString_FromStringAndSize(char *v, int l) ++ object PyString_FromStringAndSize(unsigned char *v, size_t l) + object PyUnicode_FromString(char *u) +- object PyUnicode_DecodeUTF8(char *u, int s, char *e) ++ object PyUnicode_DecodeUTF8(unsigned char *u, size_t s, char *e) + object PyUnicode_AsUTF8String(object o) + int PY_MAJOR_VERSION + +@@ -85,11 +85,11 @@ + YAML_MAPPING_START_EVENT + YAML_MAPPING_END_EVENT + +- ctypedef int yaml_read_handler_t(void *data, char *buffer, +- int size, int *size_read) except 0 ++ ctypedef int yaml_read_handler_t(void *data, unsigned char *buffer, ++ size_t size, size_t *size_read) except 0 + +- ctypedef int yaml_write_handler_t(void *data, char *buffer, +- int size) except 0 ++ ctypedef int yaml_write_handler_t(void *data, unsigned char *buffer, ++ size_t size) except 0 + + ctypedef struct yaml_mark_t: + int index +@@ -112,7 +112,7 @@ + char *handle + char *suffix + ctypedef struct _yaml_token_scalar_data_t: +- char *value ++ unsigned char *value + int length + yaml_scalar_style_t style + ctypedef struct _yaml_token_version_directive_data_t: +@@ -151,7 +151,7 @@ + ctypedef struct _yaml_event_scalar_data_t: + char *anchor + char *tag +- char *value ++ unsigned char *value + int length + int plain_implicit + int quoted_implicit +--- a/_ruamel_yaml.pyx ++++ b/_ruamel_yaml.pyx +@@ -904,7 +904,7 @@ + raise error + return 1 + +-cdef int input_handler(void *data, char *buffer, int size, int *read) except 0: ++cdef int input_handler(void *data, unsigned char *buffer, size_t size, size_t *read) except 0: + cdef CParser parser + parser = <CParser>data + if parser.stream_cache is None: +@@ -1514,7 +1514,7 @@ + self.ascend_resolver() + return 1 + +-cdef int output_handler(void *data, char *buffer, int size) except 0: ++cdef int output_handler(void *data, unsigned char *buffer, size_t size) except 0: + cdef CEmitter emitter + emitter = <CEmitter>data + if emitter.dump_unicode == 0: diff --git a/dev-python/ruamel-yaml-clib/ruamel-yaml-clib-0.2.7.ebuild b/dev-python/ruamel-yaml-clib/ruamel-yaml-clib-0.2.7.ebuild index 73dd7fb50ddc..386c5a5ceb12 100644 --- a/dev-python/ruamel-yaml-clib/ruamel-yaml-clib-0.2.7.ebuild +++ b/dev-python/ruamel-yaml-clib/ruamel-yaml-clib-0.2.7.ebuild @@ -30,6 +30,10 @@ BDEPEND=" dev-python/cython[${PYTHON_USEDEP}] " +PATCHES=( + "${FILESDIR}"/${PN}-0.2.7_cython_pointer_types.patch +) + src_unpack() { default mv "${MY_P}" ruamel_yaml_clib || die |