mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-14 05:36:48 +03:00
rename PyCapsule -> Capsule
This commit is contained in:
parent
882ac783eb
commit
934ae12ed5
|
@ -144,7 +144,7 @@ Get Internal Pointers to Objects
|
|||
``Image.core.ImageCore.id`` and ``Image.core.ImageCore.unsafe_ptrs``
|
||||
have been deprecated and will be removed in Pillow 12 (2025-10-15).
|
||||
They were used for obtaining raw pointers to ``ImageCore`` internals. To interact with
|
||||
C code, you can use ``Image.core.ImageCore.ptr``, which returns a ``PyCapsule`` object.
|
||||
C code, you can use ``Image.core.ImageCore.ptr``, which returns a ``Capsule`` object.
|
||||
|
||||
Removed features
|
||||
----------------
|
||||
|
|
|
@ -79,9 +79,7 @@ ImagingFind(const char *name) {
|
|||
}
|
||||
|
||||
if (!PyCapsule_IsValid(capsule, IMAGING_MAGIC)) {
|
||||
PyErr_Format(
|
||||
PyExc_TypeError, "Expected PyCapsule with '%s' name.", IMAGING_MAGIC
|
||||
);
|
||||
PyErr_Format(PyExc_TypeError, "Expected '%s' Capsule", IMAGING_MAGIC);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -541,9 +541,7 @@ cms_transform_apply(CmsTransformObject *self, PyObject *args) {
|
|||
|
||||
if (!PyCapsule_IsValid(i0, IMAGING_MAGIC) ||
|
||||
!PyCapsule_IsValid(i1, IMAGING_MAGIC)) {
|
||||
PyErr_Format(
|
||||
PyExc_TypeError, "Expected PyCapsule with '%s' name.", IMAGING_MAGIC
|
||||
);
|
||||
PyErr_Format(PyExc_TypeError, "Expected '%s' Capsule", IMAGING_MAGIC);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -177,16 +177,12 @@ _unop(PyObject *self, PyObject *args) {
|
|||
}
|
||||
|
||||
if (!PyCapsule_IsValid(op, MATH_FUNC_UNOP_MAGIC)) {
|
||||
PyErr_Format(
|
||||
PyExc_TypeError, "Expected PyCapsule with '%s' name.", MATH_FUNC_UNOP_MAGIC
|
||||
);
|
||||
PyErr_Format(PyExc_TypeError, "Expected '%s' Capsule", MATH_FUNC_UNOP_MAGIC);
|
||||
return NULL;
|
||||
}
|
||||
if (!PyCapsule_IsValid(i0, IMAGING_MAGIC) ||
|
||||
!PyCapsule_IsValid(i1, IMAGING_MAGIC)) {
|
||||
PyErr_Format(
|
||||
PyExc_TypeError, "Expected PyCapsule with '%s' name.", IMAGING_MAGIC
|
||||
);
|
||||
PyErr_Format(PyExc_TypeError, "Expected '%s' Capsule", IMAGING_MAGIC);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -213,17 +209,13 @@ _binop(PyObject *self, PyObject *args) {
|
|||
}
|
||||
|
||||
if (!PyCapsule_IsValid(op, MATH_FUNC_BINOP_MAGIC)) {
|
||||
PyErr_Format(
|
||||
PyExc_TypeError, "Expected PyCapsule with '%s' name.", MATH_FUNC_BINOP_MAGIC
|
||||
);
|
||||
PyErr_Format(PyExc_TypeError, "Expected '%s' Capsule", MATH_FUNC_BINOP_MAGIC);
|
||||
return NULL;
|
||||
}
|
||||
if (!PyCapsule_IsValid(i0, IMAGING_MAGIC) ||
|
||||
!PyCapsule_IsValid(i1, IMAGING_MAGIC) ||
|
||||
!PyCapsule_IsValid(i2, IMAGING_MAGIC)) {
|
||||
PyErr_Format(
|
||||
PyExc_TypeError, "Expected PyCapsule with '%s' name.", IMAGING_MAGIC
|
||||
);
|
||||
PyErr_Format(PyExc_TypeError, "Expected '%s' Capsule", IMAGING_MAGIC);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,9 +48,7 @@ apply(PyObject *self, PyObject *args) {
|
|||
|
||||
if (!PyCapsule_IsValid(i0, IMAGING_MAGIC) ||
|
||||
!PyCapsule_IsValid(i1, IMAGING_MAGIC)) {
|
||||
PyErr_Format(
|
||||
PyExc_TypeError, "Expected PyCapsule with '%s' name.", IMAGING_MAGIC
|
||||
);
|
||||
PyErr_Format(PyExc_TypeError, "Expected '%s' Capsule", IMAGING_MAGIC);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -143,9 +141,7 @@ match(PyObject *self, PyObject *args) {
|
|||
}
|
||||
|
||||
if (!PyCapsule_IsValid(i0, IMAGING_MAGIC)) {
|
||||
PyErr_Format(
|
||||
PyExc_TypeError, "Expected PyCapsule with '%s' name.", IMAGING_MAGIC
|
||||
);
|
||||
PyErr_Format(PyExc_TypeError, "Expected '%s' Capsule", IMAGING_MAGIC);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -218,9 +214,7 @@ get_on_pixels(PyObject *self, PyObject *args) {
|
|||
}
|
||||
|
||||
if (!PyCapsule_IsValid(i0, IMAGING_MAGIC)) {
|
||||
PyErr_Format(
|
||||
PyExc_TypeError, "Expected PyCapsule with '%s' name.", IMAGING_MAGIC
|
||||
);
|
||||
PyErr_Format(PyExc_TypeError, "Expected '%s' Capsule", IMAGING_MAGIC);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user