From 167864104ae7e3aae17f8b3fe761495b40050ce9 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 1 Apr 2025 07:16:14 +0300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- docs/reference/arrow_support.rst | 2 +- src/libImaging/Storage.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/reference/arrow_support.rst b/docs/reference/arrow_support.rst index 9f14f1407..4a5c45e86 100644 --- a/docs/reference/arrow_support.rst +++ b/docs/reference/arrow_support.rst @@ -64,7 +64,7 @@ Unsupported Features * Table/dataframe protocol. We support a single array. * Null markers, producing or consuming. Null values are inferred from - the mode. e.g. RGB images are stored in the first three bytes of + the mode, e.g. RGB images are stored in the first three bytes of each 32-bit pixel, and the last byte is an implied null. * Schema negotiation. There is an optional schema for the requested datatype in the Arrow source interface. We ignore that diff --git a/src/libImaging/Storage.c b/src/libImaging/Storage.c index fb2960231..4fa4ecd1c 100644 --- a/src/libImaging/Storage.c +++ b/src/libImaging/Storage.c @@ -586,7 +586,7 @@ ImagingBorrowArrow( int offset_width, PyObject *arrow_capsule ) { - // offset_width is the # of char* for a single offset from arrow + // offset_width is the number of char* for a single offset from arrow Py_ssize_t y, i; char *borrowed_buffer = NULL; @@ -735,7 +735,6 @@ ImagingNewArrow( return im; } } - // linter: don't mess with the formatting here if (strcmp(schema->format, "+w:4") == 0 // 4 up array && im->pixelsize == 4 // storage as 32 bpc && schema->n_children > 0 // make sure schema is well formed.