@@ -530,20 +530,19 @@ PyArrayDescr_Type
530
530
and ``is2`` *bytes*, respectively. This function requires
531
531
behaved (though not necessarily contiguous) memory.
532
532
533
- .. c:member:: int scanfunc(FILE* fd, void* ip , void* sep , void* arr)
533
+ .. c:member:: int scanfunc(FILE* fd, void* ip, void* arr)
534
534
535
535
A pointer to a function that scans (scanf style) one element
536
536
of the corresponding type from the file descriptor ``fd`` into
537
537
the array memory pointed to by ``ip``. The array is assumed
538
- to be behaved. If ``sep`` is not NULL, then a separator string
539
- is also scanned from the file before returning. The last
540
- argument ``arr`` is the array to be scanned into. A 0 is
541
- returned if the scan is successful. A negative number
542
- indicates something went wrong: -1 means the end of file was
543
- reached before the separator string could be scanned, -4 means
544
- that the end of file was reached before the element could be
545
- scanned, and -3 means that the element could not be
546
- interpreted from the format string. Requires a behaved array.
538
+ to be behaved.
539
+ The last argument ``arr`` is the array to be scanned into.
540
+ Returns number of receiving arguments successfully assigned (which
541
+ may be zero in case a matching failure occurred before the first
542
+ receiving argument was assigned), or EOF if input failure occurs
543
+ before the first receiving argument was assigned.
544
+ This function should be called without holding the Python GIL, and
545
+ has to grab it for error reporting.
547
546
548
547
.. c:member:: int fromstr(char* str, void* ip, char** endptr, void* arr)
549
548
@@ -554,6 +553,8 @@ PyArrayDescr_Type
554
553
string. The last argument ``arr`` is the array into which ip
555
554
points (needed for variable-size data- types). Returns 0 on
556
555
success or -1 on failure. Requires a behaved array.
556
+ This function should be called without holding the Python GIL, and
557
+ has to grab it for error reporting.
557
558
558
559
.. c:member:: Bool nonzero(void* data, void* arr)
559
560
0 commit comments