Py_ssize_t mid;
int res;
- if (lo < 0) {
- PyErr_SetString(PyExc_ValueError, "lo must be non-negative");
- return -1;
- }
if (hi == -1) {
hi = PySequence_Size(list);
if (hi < 0)
a: object
x: object
- lo: Py_ssize_t = 0
+ lo: Py_ssize_t(allow_negative=False) = 0
hi: Py_ssize_t(c_default='-1', accept={int, NoneType}) = None
*
key: object = None
static Py_ssize_t
_bisect_bisect_right_impl(PyObject *module, PyObject *a, PyObject *x,
Py_ssize_t lo, Py_ssize_t hi, PyObject *key)
-/*[clinic end generated code: output=3a4bc09cc7c8a73d input=43071869772dd53a]*/
+/*[clinic end generated code: output=3a4bc09cc7c8a73d input=b476bc45667273ac]*/
{
return internal_bisect_right(a, x, lo, hi, key);
}
a: object
x: object
- lo: Py_ssize_t = 0
+ lo: Py_ssize_t(allow_negative=False) = 0
hi: Py_ssize_t(c_default='-1', accept={int, NoneType}) = None
*
key: object = None
static PyObject *
_bisect_insort_right_impl(PyObject *module, PyObject *a, PyObject *x,
Py_ssize_t lo, Py_ssize_t hi, PyObject *key)
-/*[clinic end generated code: output=ac3bf26d07aedda2 input=f60777d2b6ddb239]*/
+/*[clinic end generated code: output=ac3bf26d07aedda2 input=f2caa8abec0763e8]*/
{
PyObject *result, *key_x;
Py_ssize_t index;
Py_ssize_t mid;
int res;
- if (lo < 0) {
- PyErr_SetString(PyExc_ValueError, "lo must be non-negative");
- return -1;
- }
if (hi == -1) {
hi = PySequence_Size(list);
if (hi < 0)
a: object
x: object
- lo: Py_ssize_t = 0
+ lo: Py_ssize_t(allow_negative=False) = 0
hi: Py_ssize_t(c_default='-1', accept={int, NoneType}) = None
*
key: object = None
static Py_ssize_t
_bisect_bisect_left_impl(PyObject *module, PyObject *a, PyObject *x,
Py_ssize_t lo, Py_ssize_t hi, PyObject *key)
-/*[clinic end generated code: output=70749d6e5cae9284 input=f29c4fe7f9b797c7]*/
+/*[clinic end generated code: output=70749d6e5cae9284 input=9b4d49b5ddecfad7]*/
{
return internal_bisect_left(a, x, lo, hi, key);
}
a: object
x: object
- lo: Py_ssize_t = 0
+ lo: Py_ssize_t(allow_negative=False) = 0
hi: Py_ssize_t(c_default='-1', accept={int, NoneType}) = None
*
key: object = None
static PyObject *
_bisect_insort_left_impl(PyObject *module, PyObject *a, PyObject *x,
Py_ssize_t lo, Py_ssize_t hi, PyObject *key)
-/*[clinic end generated code: output=b1d33e5e7ffff11e input=0a700a82edbd472c]*/
+/*[clinic end generated code: output=b1d33e5e7ffff11e input=ff85a79826e22f31]*/
{
PyObject *result, *key_x;
Py_ssize_t index;
type: self
cls: defining_class
obj: object
- offset: Py_ssize_t = 0
+ offset: Py_ssize_t(allow_negative=False) = 0
/
C.from_buffer(object, offset=0) -> C instance
static PyObject *
CDataType_from_buffer_impl(PyObject *type, PyTypeObject *cls, PyObject *obj,
Py_ssize_t offset)
-/*[clinic end generated code: output=57604e99635abd31 input=0f36cedd105ca28d]*/
+/*[clinic end generated code: output=57604e99635abd31 input=8f43e6bc44373180]*/
{
PyObject *mv;
PyObject *result;
return NULL;
}
- if (offset < 0) {
- PyErr_SetString(PyExc_ValueError,
- "offset cannot be negative");
- Py_DECREF(mv);
- return NULL;
- }
-
if (info->size > buffer->len - offset) {
PyErr_Format(PyExc_ValueError,
"Buffer size too small "
type: self
cls: defining_class
buffer: Py_buffer
- offset: Py_ssize_t = 0
+ offset: Py_ssize_t(allow_negative=False) = 0
/
C.from_buffer_copy(object, offset=0) -> C instance
static PyObject *
CDataType_from_buffer_copy_impl(PyObject *type, PyTypeObject *cls,
Py_buffer *buffer, Py_ssize_t offset)
-/*[clinic end generated code: output=c8fc62b03e5cc6fa input=2a81e11b765a6253]*/
+/*[clinic end generated code: output=c8fc62b03e5cc6fa input=41f97f512295ceec]*/
{
PyObject *result;
return NULL;
}
- if (offset < 0) {
- PyErr_SetString(PyExc_ValueError,
- "offset cannot be negative");
- return NULL;
- }
-
if (info->size > buffer->len - offset) {
PyErr_Format(PyExc_ValueError,
"Buffer size too small (%zd instead of at least %zd bytes)",
goto exit;
}
offset = ival;
+ if (offset < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "offset cannot be negative");
+ goto exit;
+ }
}
skip_optional_posonly:
return_value = CDataType_from_buffer_impl(type, cls, obj, offset);
goto exit;
}
offset = ival;
+ if (offset < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "offset cannot be negative");
+ goto exit;
+ }
}
skip_optional_posonly:
return_value = CDataType_from_buffer_copy_impl(type, cls, &buffer, offset);
}
return Simple_from_outparm_impl(self, cls);
}
-/*[clinic end generated code: output=536c9bcf4e05913e input=a9049054013a1b77]*/
+/*[clinic end generated code: output=22105663d71237ca input=a9049054013a1b77]*/
/*[clinic input]
_hashlib.HASHXOF.digest
- length: Py_ssize_t
+ length: Py_ssize_t(allow_negative=False)
Return the digest value as a bytes object.
[clinic start generated code]*/
static PyObject *
_hashlib_HASHXOF_digest_impl(HASHobject *self, Py_ssize_t length)
-/*[clinic end generated code: output=dcb09335dd2fe908 input=3eb034ce03c55b21]*/
+/*[clinic end generated code: output=dcb09335dd2fe908 input=224d047da2c12a42]*/
{
EVP_MD_CTX *temp_ctx;
PyObject *retval;
- if (length < 0) {
- PyErr_SetString(PyExc_ValueError, "negative digest length");
- return NULL;
- }
-
if (length == 0) {
return Py_GetConstant(Py_CONSTANT_EMPTY_BYTES);
}
/*[clinic input]
_hashlib.HASHXOF.hexdigest
- length: Py_ssize_t
+ length: Py_ssize_t(allow_negative=False)
Return the digest value as a string of hexadecimal digits.
[clinic start generated code]*/
static PyObject *
_hashlib_HASHXOF_hexdigest_impl(HASHobject *self, Py_ssize_t length)
-/*[clinic end generated code: output=519431cafa014f39 input=0e58f7238adb7ab8]*/
+/*[clinic end generated code: output=519431cafa014f39 input=4a41b8ab5d3bfee2]*/
{
unsigned char *digest;
EVP_MD_CTX *temp_ctx;
PyObject *retval;
- if (length < 0) {
- PyErr_SetString(PyExc_ValueError, "negative digest length");
- return NULL;
- }
-
if (length == 0) {
return Py_GetConstant(Py_CONSTANT_EMPTY_STR);
}
cls: defining_class
f: object
- n: Py_ssize_t
+ n: Py_ssize_t(allow_negative=False)
/
Read n objects from the file object f and append them to the end of the array.
static PyObject *
array_array_fromfile_impl(arrayobject *self, PyTypeObject *cls, PyObject *f,
Py_ssize_t n)
-/*[clinic end generated code: output=83a667080b345ebc input=b2b4bdfb7ad4d4ae]*/
+/*[clinic end generated code: output=83a667080b345ebc input=db46b06ac1b6de87]*/
{
PyObject *b, *res;
Py_ssize_t itemsize = self->ob_descr->itemsize;
Py_ssize_t nbytes;
int not_enough_bytes;
- if (n < 0) {
- PyErr_SetString(PyExc_ValueError, "negative count");
- return NULL;
- }
if (n > PY_SSIZE_T_MAX / itemsize) {
PyErr_NoMemory();
return NULL;
goto exit;
}
lo = ival;
+ if (lo < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "lo cannot be negative");
+ goto exit;
+ }
}
if (!--noptargs) {
goto skip_optional_pos;
goto exit;
}
lo = ival;
+ if (lo < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "lo cannot be negative");
+ goto exit;
+ }
}
if (!--noptargs) {
goto skip_optional_pos;
goto exit;
}
lo = ival;
+ if (lo < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "lo cannot be negative");
+ goto exit;
+ }
}
if (!--noptargs) {
goto skip_optional_pos;
goto exit;
}
lo = ival;
+ if (lo < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "lo cannot be negative");
+ goto exit;
+ }
}
if (!--noptargs) {
goto skip_optional_pos;
exit:
return return_value;
}
-/*[clinic end generated code: output=729385c6a23828ab input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a3c44ed440dd6d81 input=a9049054013a1b77]*/
goto exit;
}
length = ival;
+ if (length < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "length cannot be negative");
+ goto exit;
+ }
}
return_value = _hashlib_HASHXOF_digest_impl((HASHobject *)self, length);
goto exit;
}
length = ival;
+ if (length < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "length cannot be negative");
+ goto exit;
+ }
}
return_value = _hashlib_HASHXOF_hexdigest_impl((HASHobject *)self, length);
#ifndef _HASHLIB_OPENSSL_SHAKE_256_METHODDEF
#define _HASHLIB_OPENSSL_SHAKE_256_METHODDEF
#endif /* !defined(_HASHLIB_OPENSSL_SHAKE_256_METHODDEF) */
-/*[clinic end generated code: output=cd5ff436f6dc2938 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=9ba35fcc33795b1e input=a9049054013a1b77]*/
goto exit;
}
n = ival;
+ if (n < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "n cannot be negative");
+ goto exit;
+ }
}
return_value = array_array_fromfile_impl((arrayobject *)self, cls, f, n);
return return_value;
}
-/*[clinic end generated code: output=dd49451ac1cc3f39 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=c993c3598085840e input=a9049054013a1b77]*/
goto exit;
}
n = ival;
+ if (n < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "n cannot be negative");
+ goto exit;
+ }
}
skip_optional:
return_value = itertools_tee_impl(module, iterable, n);
goto exit;
}
r = ival;
+ if (r < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "r cannot be negative");
+ goto exit;
+ }
}
return_value = itertools_combinations_impl(type, iterable, r);
goto exit;
}
r = ival;
+ if (r < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "r cannot be negative");
+ goto exit;
+ }
}
return_value = itertools_combinations_with_replacement_impl(type, iterable, r);
exit:
return return_value;
}
-/*[clinic end generated code: output=999758202a532e0a input=a9049054013a1b77]*/
+/*[clinic end generated code: output=7f385837b13edbeb input=a9049054013a1b77]*/
goto exit;
}
count = ival;
+ if (count < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "count cannot be negative");
+ goto exit;
+ }
}
if (!noptargs) {
goto skip_optional_pos;
goto exit;
}
count = ival;
+ if (count < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "count cannot be negative");
+ goto exit;
+ }
}
if (!noptargs) {
goto skip_optional_pos;
goto exit;
}
size = ival;
+ if (size < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "size cannot be negative");
+ goto exit;
+ }
}
return_value = os_urandom_impl(module, size);
#ifndef OS__EMSCRIPTEN_LOG_METHODDEF
#define OS__EMSCRIPTEN_LOG_METHODDEF
#endif /* !defined(OS__EMSCRIPTEN_LOG_METHODDEF) */
-/*[clinic end generated code: output=23de5d098e2dd73f input=a9049054013a1b77]*/
+/*[clinic end generated code: output=77c20b53c34ccae4 input=a9049054013a1b77]*/
goto exit;
}
length = ival;
+ if (length < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "length cannot be negative");
+ goto exit;
+ }
}
return_value = _sha3_shake_128_digest_impl((SHA3object *)self, length);
goto exit;
}
length = ival;
+ if (length < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "length cannot be negative");
+ goto exit;
+ }
}
return_value = _sha3_shake_128_hexdigest_impl((SHA3object *)self, length);
exit:
return return_value;
}
-/*[clinic end generated code: output=48be77f8a31e8a3e input=a9049054013a1b77]*/
+/*[clinic end generated code: output=78284adde71d590c input=a9049054013a1b77]*/
goto exit;
}
bufsize = ival;
+ if (bufsize < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "bufsize cannot be negative");
+ goto exit;
+ }
}
skip_optional_pos:
return_value = zlib_decompress_impl(module, &data, wbits, bufsize);
goto exit;
}
max_length = ival;
+ if (max_length < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "max_length cannot be negative");
+ goto exit;
+ }
}
skip_optional_pos:
return_value = zlib_Decompress_decompress_impl((compobject *)self, cls, &data, max_length);
#ifndef ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF
#define ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF
#endif /* !defined(ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF) */
-/*[clinic end generated code: output=59184b81fea41d3d input=a9049054013a1b77]*/
+/*[clinic end generated code: output=fa5fc356f3090cce input=a9049054013a1b77]*/
/*[clinic input]
itertools.tee
iterable: object
- n: Py_ssize_t = 2
+ n: Py_ssize_t(allow_negative=False) = 2
/
Returns a tuple of n independent iterators.
[clinic start generated code]*/
static PyObject *
itertools_tee_impl(PyObject *module, PyObject *iterable, Py_ssize_t n)
-/*[clinic end generated code: output=1c64519cd859c2f0 input=c99a1472c425d66d]*/
+/*[clinic end generated code: output=1c64519cd859c2f0 input=0f72d78e655f45cb]*/
{
Py_ssize_t i;
PyObject *it, *to, *result;
- if (n < 0) {
- PyErr_SetString(PyExc_ValueError, "n must be >= 0");
- return NULL;
- }
result = PyTuple_New(n);
if (result == NULL)
return NULL;
@classmethod
itertools.combinations.__new__
iterable: object
- r: Py_ssize_t
+ r: Py_ssize_t(allow_negative=False)
Return successive r-length combinations of elements in the iterable.
combinations(range(4), 3) --> (0,1,2), (0,1,3), (0,2,3), (1,2,3)
static PyObject *
itertools_combinations_impl(PyTypeObject *type, PyObject *iterable,
Py_ssize_t r)
-/*[clinic end generated code: output=87a689b39c40039c input=06bede09e3da20f8]*/
+/*[clinic end generated code: output=87a689b39c40039c input=a32f07a15cfa4676]*/
{
combinationsobject *co;
Py_ssize_t n;
if (pool == NULL)
goto error;
n = PyTuple_GET_SIZE(pool);
- if (r < 0) {
- PyErr_SetString(PyExc_ValueError, "r must be non-negative");
- goto error;
- }
indices = PyMem_New(Py_ssize_t, r);
if (indices == NULL) {
@classmethod
itertools.combinations_with_replacement.__new__
iterable: object
- r: Py_ssize_t
+ r: Py_ssize_t(allow_negative=False)
Return successive r-length combinations of elements in the iterable allowing individual elements to have successive repeats.
combinations_with_replacement('ABC', 2) --> ('A','A'), ('A','B'), ('A','C'), ('B','B'), ('B','C'), ('C','C')
itertools_combinations_with_replacement_impl(PyTypeObject *type,
PyObject *iterable,
Py_ssize_t r)
-/*[clinic end generated code: output=48b26856d4e659ca input=26ebe0e42149e9fb]*/
+/*[clinic end generated code: output=48b26856d4e659ca input=828696750169e84f]*/
{
cwrobject *co;
Py_ssize_t n;
if (pool == NULL)
goto error;
n = PyTuple_GET_SIZE(pool);
- if (r < 0) {
- PyErr_SetString(PyExc_ValueError, "r must be non-negative");
- goto error;
- }
indices = PyMem_New(Py_ssize_t, r);
if (indices == NULL) {
Source file descriptor.
dst: int
Destination file descriptor.
- count: Py_ssize_t
+ count: Py_ssize_t(allow_negative=False)
Number of bytes to copy.
offset_src: object = None
Starting offset in src.
static PyObject *
os_copy_file_range_impl(PyObject *module, int src, int dst, Py_ssize_t count,
PyObject *offset_src, PyObject *offset_dst)
-/*[clinic end generated code: output=1a91713a1d99fc7a input=42fdce72681b25a9]*/
+/*[clinic end generated code: output=1a91713a1d99fc7a input=08dacb760869b87c]*/
{
off_t offset_src_val, offset_dst_val;
off_t *p_offset_src = NULL;
int flags = 0;
- if (count < 0) {
- PyErr_SetString(PyExc_ValueError, "negative value for 'count' not allowed");
- return NULL;
- }
-
if (offset_src != Py_None) {
if (!Py_off_t_converter(offset_src, &offset_src_val)) {
return NULL;
Source file descriptor.
dst: int
Destination file descriptor.
- count: Py_ssize_t
+ count: Py_ssize_t(allow_negative=False)
Number of bytes to copy.
offset_src: object = None
Starting offset in src.
os_splice_impl(PyObject *module, int src, int dst, Py_ssize_t count,
PyObject *offset_src, PyObject *offset_dst,
unsigned int flags)
-/*[clinic end generated code: output=d0386f25a8519dc5 input=047527c66c6d2e0a]*/
+/*[clinic end generated code: output=d0386f25a8519dc5 input=034852a7b2e7af35]*/
{
off_t offset_src_val, offset_dst_val;
off_t *p_offset_src = NULL;
Py_ssize_t ret;
int async_err = 0;
- if (count < 0) {
- PyErr_SetString(PyExc_ValueError, "negative value for 'count' not allowed");
- return NULL;
- }
if (offset_src != Py_None) {
if (!Py_off_t_converter(offset_src, &offset_src_val)) {
@permit_long_summary
os.urandom
- size: Py_ssize_t
+ size: Py_ssize_t(allow_negative=False)
/
Return a bytes object containing random bytes suitable for cryptographic use.
static PyObject *
os_urandom_impl(PyObject *module, Py_ssize_t size)
-/*[clinic end generated code: output=42c5cca9d18068e9 input=ade19e6b362e7388]*/
+/*[clinic end generated code: output=42c5cca9d18068e9 input=58a0def87dbc2c22]*/
{
PyObject *bytes;
int result;
- if (size < 0)
- return PyErr_Format(PyExc_ValueError,
- "negative argument not allowed");
bytes = PyBytes_FromStringAndSize(NULL, size);
if (bytes == NULL)
return NULL;
static int
sha3_shake_check_digest_length(Py_ssize_t length)
{
- if (length < 0) {
- PyErr_SetString(PyExc_ValueError, "negative digest length");
- return -1;
- }
+ assert(length >= 0);
if ((size_t)length >= (1 << 29)) {
/*
* Raise OverflowError to match the semantics of OpenSSL SHAKE
/*[clinic input]
_sha3.shake_128.digest
- length: Py_ssize_t
+ length: Py_ssize_t(allow_negative=False)
Return the digest value as a bytes object.
[clinic start generated code]*/
static PyObject *
_sha3_shake_128_digest_impl(SHA3object *self, Py_ssize_t length)
-/*[clinic end generated code: output=6c53fb71a6cff0a0 input=be03ade4b31dd54c]*/
+/*[clinic end generated code: output=6c53fb71a6cff0a0 input=1160c9f86ae0f867]*/
{
if (sha3_shake_check_digest_length(length) < 0) {
return NULL;
/*[clinic input]
_sha3.shake_128.hexdigest
- length: Py_ssize_t
+ length: Py_ssize_t(allow_negative=False)
Return the digest value as a string of hexadecimal digits.
[clinic start generated code]*/
static PyObject *
_sha3_shake_128_hexdigest_impl(SHA3object *self, Py_ssize_t length)
-/*[clinic end generated code: output=a27412d404f64512 input=0d84d05d7a8ccd37]*/
+/*[clinic end generated code: output=a27412d404f64512 input=ff06c9362949d2c8]*/
{
if (sha3_shake_check_digest_length(length) < 0) {
return NULL;
/
wbits: int(c_default="MAX_WBITS") = MAX_WBITS
The window buffer size and container format.
- bufsize: Py_ssize_t(c_default="DEF_BUF_SIZE") = DEF_BUF_SIZE
+ bufsize: Py_ssize_t(c_default="DEF_BUF_SIZE", allow_negative=False) = DEF_BUF_SIZE
The initial output buffer size.
Returns a bytes object containing the uncompressed data.
static PyObject *
zlib_decompress_impl(PyObject *module, Py_buffer *data, int wbits,
Py_ssize_t bufsize)
-/*[clinic end generated code: output=77c7e35111dc8c42 input=a9ac17beff1f893f]*/
+/*[clinic end generated code: output=77c7e35111dc8c42 input=530077065b3a2233]*/
{
PyObject *return_value;
Byte *ibuf;
zlibstate *state = get_zlib_state(module);
- if (bufsize < 0) {
- PyErr_SetString(PyExc_ValueError, "bufsize must be non-negative");
- return NULL;
- } else if (bufsize == 0) {
+ if (bufsize == 0) {
bufsize = 1;
}
data: Py_buffer
The binary data to decompress.
/
- max_length: Py_ssize_t = 0
+ max_length: Py_ssize_t(allow_negative=False) = 0
The maximum allowable length of the decompressed data.
Unconsumed input data will be stored in
the unconsumed_tail attribute.
static PyObject *
zlib_Decompress_decompress_impl(compobject *self, PyTypeObject *cls,
Py_buffer *data, Py_ssize_t max_length)
-/*[clinic end generated code: output=b024a93c2c922d57 input=205667f8c387fce4]*/
+/*[clinic end generated code: output=b024a93c2c922d57 input=77de124bd2a2ecc0]*/
{
int err = Z_OK;
Py_ssize_t ibuflen;
return NULL;
zlibstate *state = get_zlib_state(module);
- if (max_length < 0) {
- PyErr_SetString(PyExc_ValueError, "max_length must be non-negative");
- return NULL;
- } else if (max_length == 0) {
+ if (max_length == 0) {
max_length = -1;
}
goto exit;
}
length = ival;
+ if (length < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "length cannot be negative");
+ goto exit;
+ }
}
if (!--noptargs) {
goto skip_optional_pos;
{
return int_is_integer_impl(self);
}
-/*[clinic end generated code: output=d23f8ce5bdf08a30 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=e68f4e23ead3f649 input=a9049054013a1b77]*/
/*[clinic input]
int.to_bytes
- length: Py_ssize_t = 1
+ length: Py_ssize_t(allow_negative=False) = 1
Length of bytes object to use. An OverflowError is raised if the
integer is not representable with the given number of bytes. Default
is length 1.
static PyObject *
int_to_bytes_impl(PyObject *self, Py_ssize_t length, PyObject *byteorder,
int is_signed)
-/*[clinic end generated code: output=89c801df114050a3 input=a0103d0e9ad85c2b]*/
+/*[clinic end generated code: output=89c801df114050a3 input=66f9d0c20529b44f]*/
{
int little_endian;
PyObject *bytes;
return NULL;
}
- if (length < 0) {
- PyErr_SetString(PyExc_ValueError,
- "length argument must be non-negative");
- return NULL;
- }
-
bytes = PyBytes_FromStringAndSize(NULL, length);
if (bytes == NULL)
return NULL;