@@ -390,7 +390,7 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
390390 Usage example::
391391
392392 int32_t value;
393- Py_ssize_t bytes = PyLong_AsNativeBits (pylong, &value, sizeof (value), -1 );
393+ Py_ssize_t bytes = PyLong_AsNativeBytes (pylong, &value, sizeof (value), -1 );
394394 if (bytes < 0 ) {
395395 // Failed. A Python exception was set with the reason.
396396 return NULL;
@@ -418,7 +418,7 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
418418 called twice: first to determine the buffer size, then to fill it::
419419
420420 // Ask how much space we need.
421- Py_ssize_t expected = PyLong_AsNativeBits (pylong, NULL, 0, -1);
421+ Py_ssize_t expected = PyLong_AsNativeBytes (pylong, NULL, 0, -1);
422422 if (expected < 0) {
423423 // Failed. A Python exception was set with the reason.
424424 return NULL;
@@ -430,7 +430,7 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
430430 return NULL;
431431 }
432432 // Safely get the entire value.
433- Py_ssize_t bytes = PyLong_AsNativeBits (pylong, bignum, expected, -1);
433+ Py_ssize_t bytes = PyLong_AsNativeBytes (pylong, bignum, expected, -1);
434434 if (bytes < 0) { // Exception has been set.
435435 free(bignum);
436436 return NULL;
0 commit comments