GH-99005: More intrinsics (GH-100774)

* Remove UNARY_POSITIVE, LIST_TO_TUPLE and ASYNC_GEN_WRAP, replacing them with intrinsics.
This commit is contained in:
Mark Shannon 2023-01-06 14:47:57 +00:00 committed by GitHub
parent 659c2607f5
commit 78068126a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 151 additions and 204 deletions

View file

@ -1970,13 +1970,13 @@ PyTypeObject _PyAsyncGenWrappedValue_Type = {
PyObject *
_PyAsyncGenValueWrapperNew(PyObject *val)
_PyAsyncGenValueWrapperNew(PyThreadState *tstate, PyObject *val)
{
_PyAsyncGenWrappedValue *o;
assert(val);
#if _PyAsyncGen_MAXFREELIST > 0
struct _Py_async_gen_state *state = get_async_gen_state();
struct _Py_async_gen_state *state = &tstate->interp->async_gen;
#ifdef Py_DEBUG
// _PyAsyncGenValueWrapperNew() must not be called after _PyAsyncGen_Fini()
assert(state->value_numfree != -1);