Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite61a447

Browse files
authored
gh-142873: Do not check forPyContextVar_CheckExact twice inPyContextVar_Set (#142874)
1 parent77c8e6a commite61a447

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

‎Python/context.c‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,6 @@ PyContextVar_Set(PyObject *ovar, PyObject *val)
343343
ENSURE_ContextVar(ovar,NULL)
344344
PyContextVar*var= (PyContextVar*)ovar;
345345

346-
if (!PyContextVar_CheckExact(var)) {
347-
PyErr_SetString(
348-
PyExc_TypeError,"an instance of ContextVar was expected");
349-
returnNULL;
350-
}
351-
352346
PyContext*ctx=context_get();
353347
if (ctx==NULL) {
354348
returnNULL;
@@ -1025,12 +1019,6 @@ static PyObject *
10251019
_contextvars_ContextVar_get_impl(PyContextVar*self,PyObject*default_value)
10261020
/*[clinic end generated code: output=0746bd0aa2ced7bf input=da66664d5d0af4ad]*/
10271021
{
1028-
if (!PyContextVar_CheckExact(self)) {
1029-
PyErr_SetString(
1030-
PyExc_TypeError,"an instance of ContextVar was expected");
1031-
returnNULL;
1032-
}
1033-
10341022
PyObject*val;
10351023
if (PyContextVar_Get((PyObject*)self,default_value,&val)<0) {
10361024
returnNULL;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp