Apply suggestions from code review

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Hugo van Kemenade 2025-04-01 07:16:14 +03:00 committed by GitHub
parent 3e28e05c76
commit 167864104a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -64,7 +64,7 @@ Unsupported Features
* Table/dataframe protocol. We support a single array. * Table/dataframe protocol. We support a single array.
* Null markers, producing or consuming. Null values are inferred from * 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. each 32-bit pixel, and the last byte is an implied null.
* Schema negotiation. There is an optional schema for the requested * Schema negotiation. There is an optional schema for the requested
datatype in the Arrow source interface. We ignore that datatype in the Arrow source interface. We ignore that

View File

@ -586,7 +586,7 @@ ImagingBorrowArrow(
int offset_width, int offset_width,
PyObject *arrow_capsule 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; Py_ssize_t y, i;
char *borrowed_buffer = NULL; char *borrowed_buffer = NULL;
@ -735,7 +735,6 @@ ImagingNewArrow(
return im; return im;
} }
} }
// linter: don't mess with the formatting here
if (strcmp(schema->format, "+w:4") == 0 // 4 up array if (strcmp(schema->format, "+w:4") == 0 // 4 up array
&& im->pixelsize == 4 // storage as 32 bpc && im->pixelsize == 4 // storage as 32 bpc
&& schema->n_children > 0 // make sure schema is well formed. && schema->n_children > 0 // make sure schema is well formed.