diff options
-rw-r--r-- | Cython/Includes/cpython/contextvars.pxd | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Includes/cpython/contextvars.pxd b/Cython/Includes/cpython/contextvars.pxd index cc73cb365..d4065cd8e 100644 --- a/Cython/Includes/cpython/contextvars.pxd +++ b/Cython/Includes/cpython/contextvars.pxd @@ -114,7 +114,7 @@ cdef inline object get_value(var, default_value=None): or the default value of the context variable, or None if no such value or default was found. """ - cdef PyObject *value + cdef PyObject *value = NULL PyContextVar_Get(var, NULL, &value) if value is NULL: # context variable does not have a default @@ -132,7 +132,7 @@ cdef inline object get_value_no_default(var, default_value=None): Ignores the default value of the context variable, if any. """ - cdef PyObject *value + cdef PyObject *value = NULL PyContextVar_Get(var, <PyObject*>default_value, &value) # value of context variable or 'default_value' pyvalue = <object>value |