python3-bitarray: update to 2.6.0.
This commit is contained in:
parent
1acd60f83a
commit
d9a0015833
@ -1,56 +0,0 @@
|
||||
--- a/bitarray/_bitarray.c
|
||||
+++ b/bitarray/_bitarray.c
|
||||
@@ -118,7 +118,11 @@ resize(bitarrayobject *self, idx_t nbits
|
||||
*/
|
||||
if (allocated >= newsize && newsize >= (allocated >> 1)) {
|
||||
assert(self->ob_item != NULL || newsize == 0);
|
||||
+#if PY_VERSION_HEX >= 0x03090000
|
||||
+ Py_SET_SIZE(self, newsize);
|
||||
+#else
|
||||
Py_SIZE(self) = newsize;
|
||||
+#endif
|
||||
self->nbits = nbits;
|
||||
return 0;
|
||||
}
|
||||
@@ -143,7 +147,11 @@ resize(bitarrayobject *self, idx_t nbits
|
||||
PyErr_NoMemory();
|
||||
return -1;
|
||||
}
|
||||
+#if PY_VERSION_HEX >= 0x03090000
|
||||
+ Py_SET_SIZE(self, newsize);
|
||||
+#else
|
||||
Py_SIZE(self) = newsize;
|
||||
+#endif
|
||||
self->allocated = new_allocated;
|
||||
self->nbits = nbits;
|
||||
return 0;
|
||||
@@ -164,7 +172,11 @@ newbitarrayobject(PyTypeObject *type, id
|
||||
return NULL;
|
||||
|
||||
nbytes = (Py_ssize_t) BYTES(nbits);
|
||||
+#if PY_VERSION_HEX >= 0x03090000
|
||||
+ Py_SET_SIZE(obj, nbytes);
|
||||
+#else
|
||||
Py_SIZE(obj) = nbytes;
|
||||
+#endif
|
||||
obj->nbits = nbits;
|
||||
obj->endian = endian;
|
||||
if (nbytes == 0) {
|
||||
@@ -3222,10 +3234,17 @@ init_bitarray(void)
|
||||
{
|
||||
PyObject *m;
|
||||
|
||||
+#if PY_VERSION_HEX >= 0x03090000
|
||||
+ Py_SET_TYPE(&Bitarraytype, &PyType_Type);
|
||||
+ Py_SET_TYPE(&SearchIter_Type, &PyType_Type);
|
||||
+ Py_SET_TYPE(&DecodeIter_Type, &PyType_Type);
|
||||
+ Py_SET_TYPE(&BitarrayIter_Type, &PyType_Type);
|
||||
+#else
|
||||
Py_TYPE(&Bitarraytype) = &PyType_Type;
|
||||
Py_TYPE(&SearchIter_Type) = &PyType_Type;
|
||||
Py_TYPE(&DecodeIter_Type) = &PyType_Type;
|
||||
Py_TYPE(&BitarrayIter_Type) = &PyType_Type;
|
||||
+#endif
|
||||
#ifdef IS_PY3K
|
||||
m = PyModule_Create(&moduledef);
|
||||
if (m == NULL)
|
@ -1,7 +1,7 @@
|
||||
# Template file for 'python3-bitarray'
|
||||
pkgname=python3-bitarray
|
||||
version=1.0.1
|
||||
revision=6
|
||||
version=2.6.0
|
||||
revision=1
|
||||
wrksrc="bitarray-${version}"
|
||||
build_style=python3-module
|
||||
hostmakedepends="python3-setuptools"
|
||||
@ -12,7 +12,7 @@ maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
|
||||
license="Python-2.0"
|
||||
homepage="https://github.com/ilanschnell/bitarray"
|
||||
distfiles="https://github.com/ilanschnell/bitarray/archive/${version}.tar.gz"
|
||||
checksum=bc5be12525ba67c6dd1fffc28b4a035aa52139a4be0aa94df1b544074284113e
|
||||
checksum=32fc30c0ca8ae86bdbfbc0e77fb3c813695022a22cfea05f31c7af545fc15ff7
|
||||
|
||||
post_install() {
|
||||
vlicense LICENSE
|
||||
|
Loading…
x
Reference in New Issue
Block a user