diff options
author | Ken Jin <kenjin@python.org> | 2024-03-06 19:30:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 19:30:11 (GMT) |
commit | 7114cf20c015b99123b32c1ba4f5475b7a6c3a13 (patch) | |
tree | 1c5392c31ac5d921cfb0b5856ff2df66cdfd4682 /Objects/setobject.c | |
parent | 73807eb634315f70a464a18feaae33d9e065de09 (diff) | |
download | cpython-7114cf20c015b99123b32c1ba4f5475b7a6c3a13.zip cpython-7114cf20c015b99123b32c1ba4f5475b7a6c3a13.tar.gz cpython-7114cf20c015b99123b32c1ba4f5475b7a6c3a13.tar.bz2 |
gh-116381: Specialize CONTAINS_OP (GH-116385)
* Specialize CONTAINS_OP
* 📜🤖 Added by blurb_it.
* Add PyAPI_FUNC for JIT
---------
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r-- | Objects/setobject.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c index 6a4c8c4..b4d803c 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -1987,8 +1987,8 @@ set_add(PySetObject *so, PyObject *key) Py_RETURN_NONE; } -static int -set_contains(PySetObject *so, PyObject *key) +int +_PySet_Contains(PySetObject *so, PyObject *key) { PyObject *tmpkey; int rv; @@ -2023,7 +2023,7 @@ set___contains__(PySetObject *so, PyObject *key) { long result; - result = set_contains(so, key); + result = _PySet_Contains(so, key); if (result < 0) return NULL; return PyBool_FromLong(result); @@ -2198,7 +2198,7 @@ static PySequenceMethods set_as_sequence = { 0, /* sq_slice */ 0, /* sq_ass_item */ 0, /* sq_ass_slice */ - (objobjproc)set_contains, /* sq_contains */ + (objobjproc)_PySet_Contains, /* sq_contains */ }; /* set object ********************************************************/ |