Skip to content

Commit 7ddc056

Browse files
committed
input -> data
1 parent ff51b84 commit 7ddc056

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/_xxhash.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,19 @@ _get_buffer_or_str(PyObject *obj, Py_buffer *buf)
6969
return 0;
7070
}
7171

72-
/* Parse input buffer and optional seed from fastcall arguments.
72+
/* Parse data buffer and optional seed from fastcall arguments.
7373
* Handles: positional 'data', positional 'seed', keyword 'data',
7474
* keyword 'seed', with proper error reporting for unknown keywords,
7575
* duplicate arguments, and too many positional args.
7676
* Returns 0 on success, -1 on error with exception set. */
7777
static Py_ALWAYS_INLINE int
7878
_parse_fastcall_args(PyObject *const *args, Py_ssize_t nargs,
7979
PyObject *kwnames, const char *funcname,
80-
int input_required,
80+
int data_required,
8181
Py_buffer *buf,
8282
unsigned long long *seed)
8383
{
84-
int input_found = 0;
84+
int data_found = 0;
8585
int seed_found = 0;
8686

8787
*seed = 0;
@@ -92,7 +92,7 @@ _parse_fastcall_args(PyObject *const *args, Py_ssize_t nargs,
9292
if (nargs >= 1) {
9393
if (_get_buffer_or_str(args[0], buf) < 0)
9494
return -1;
95-
input_found = 1;
95+
data_found = 1;
9696
}
9797
if (nargs >= 2) {
9898
*seed = PyLong_AsUnsignedLongLongMask(args[1]);
@@ -115,15 +115,15 @@ _parse_fastcall_args(PyObject *const *args, Py_ssize_t nargs,
115115
PyObject *val = args[nargs + i];
116116

117117
if (PyUnicode_CompareWithASCIIString(key, "data") == 0) {
118-
if (input_found) {
118+
if (data_found) {
119119
PyErr_Format(PyExc_TypeError,
120120
"%s() got multiple values for argument 'data'",
121121
funcname);
122122
goto error;
123123
}
124124
if (_get_buffer_or_str(val, buf) < 0)
125125
return -1;
126-
input_found = 1;
126+
data_found = 1;
127127
} else if (PyUnicode_CompareWithASCIIString(key, "seed") == 0) {
128128
if (seed_found) {
129129
PyErr_Format(PyExc_TypeError,
@@ -144,15 +144,15 @@ _parse_fastcall_args(PyObject *const *args, Py_ssize_t nargs,
144144
}
145145
}
146146

147-
if (!input_found && input_required) {
147+
if (!data_found && data_required) {
148148
PyErr_Format(PyExc_TypeError,
149149
"%s() missing required argument 'data'", funcname);
150150
return -1;
151151
}
152152
return 0;
153153

154154
error:
155-
if (input_found) {
155+
if (data_found) {
156156
PyBuffer_Release(buf);
157157
}
158158
return -1;

0 commit comments

Comments
 (0)