mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
Update array2d.c
This commit is contained in:
parent
b4b9651373
commit
2061f90a27
@ -3,8 +3,8 @@
|
|||||||
#include "pocketpy/pocketpy.h"
|
#include "pocketpy/pocketpy.h"
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
static bool c11_array2d_like_is_valid(c11_array2d_like* self, unsigned int col, unsigned int row) {
|
static bool c11_array2d_like_is_valid(c11_array2d_like* self, int col, int row) {
|
||||||
return col < self->n_cols && row < self->n_rows;
|
return col >= 0 && col < self->n_cols && row >= 0 && row < self->n_rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
static py_Ref c11_array2d__get(c11_array2d* self, int col, int row) {
|
static py_Ref c11_array2d__get(c11_array2d* self, int col, int row) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user