forked from python/cpython
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythongh-116417: Move 4 limited C API test files to _testlimitedcapi
Move the following files from Modules/_testcapi/ to Modules/_testlimitedcapi/: * bytearray.c * bytes.c * pyos.c * sys.c Update related test_capi tests. Copy Modules/_testcapi/util.h to Modules/_testlimitedcapi/util.h.
- Loading branch information
Showing
17 changed files
with
97 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#define NULLABLE(x) do { \ | ||
if (x == Py_None) { \ | ||
x = NULL; \ | ||
} \ | ||
} while (0); | ||
|
||
#define RETURN_INT(value) do { \ | ||
int _ret = (value); \ | ||
if (_ret == -1) { \ | ||
assert(PyErr_Occurred()); \ | ||
return NULL; \ | ||
} \ | ||
assert(!PyErr_Occurred()); \ | ||
return PyLong_FromLong(_ret); \ | ||
} while (0) | ||
|
||
#define RETURN_SIZE(value) do { \ | ||
Py_ssize_t _ret = (value); \ | ||
if (_ret == -1) { \ | ||
assert(PyErr_Occurred()); \ | ||
return NULL; \ | ||
} \ | ||
assert(!PyErr_Occurred()); \ | ||
return PyLong_FromSsize_t(_ret); \ | ||
} while (0) | ||
|
||
/* Marker to check that pointer value was set. */ | ||
static const char uninitialized[] = "uninitialized"; | ||
#define UNINITIALIZED_PTR ((void *)uninitialized) | ||
/* Marker to check that Py_ssize_t value was set. */ | ||
#define UNINITIALIZED_SIZE ((Py_ssize_t)236892191) | ||
/* Marker to check that integer value was set. */ | ||
#define UNINITIALIZED_INT (63256717) |
Oops, something went wrong.