Lines Matching defs:count
321 bytearray_repeat(PyByteArrayObject *self, Py_ssize_t count)
323 if (count < 0)
324 count = 0;
326 if (count > 0 && mysize > PY_SSIZE_T_MAX / count)
328 Py_ssize_t size = mysize * count;
338 bytearray_irepeat(PyByteArrayObject *self, Py_ssize_t count)
340 if (count < 0)
341 count = 0;
342 else if (count == 1) {
348 if (count > 0 && mysize > PY_SSIZE_T_MAX / count)
350 const Py_ssize_t size = mysize * count;
756 Py_ssize_t count;
809 count = PyNumber_AsSsize_t(arg, PyExc_OverflowError);
810 if (count == -1 && PyErr_Occurred()) {
816 if (count < 0) {
817 PyErr_SetString(PyExc_ValueError, "negative count");
820 if (count > 0) {
821 if (PyByteArray_Resize((PyObject *)self, count))
823 memset(PyByteArray_AS_STRING(self), 0, count);
1116 #include "stringlib/count.h"
1402 count: Py_ssize_t = -1
1409 If the optional argument count is given, only the first count occurrences are
1415 Py_buffer *new, Py_ssize_t count)
1420 (const char *)new->buf, new->len, count);
2065 How many bytes between separators. Positive values count from the
2066 right, negative values count from the left.
2198 {"count", (PyCFunction)bytearray_count, METH_VARARGS,