@@ -112,9 +112,9 @@ Context variable functions:
112
112
.. c:function:: PyObject *PyContextVar_New(const char *name, PyObject *def)
113
113
114
114
Create a new ``ContextVar `` object. The *name * parameter is used
115
- for introspection and debug purposes. The *def * parameter may optionally
116
- specify the default value for the context variable. If an error has
117
- occurred, this function returns ``NULL ``.
115
+ for introspection and debug purposes. The *def * parameter specifies
116
+ a default value for the context variable, or `` NULL `` for no default.
117
+ If an error has occurred, this function returns ``NULL ``.
118
118
119
119
.. c :function :: int PyContextVar_Get (PyObject *var, PyObject *default_value, PyObject **value)
120
120
@@ -129,13 +129,12 @@ Context variable functions:
129
129
- the default value of *var *, if not ``NULL ``;
130
130
- ``NULL ``
131
131
132
- If the value was found , the function will create a new reference to it .
132
+ Except for `` NULL `` , the function returns a new reference.
133
133
134
134
.. c :function :: PyObject *PyContextVar_Set (PyObject *var, PyObject *value)
135
135
136
- Set the value of *var * to *value * in the current context. Returns a
137
- pointer to a :c:type: `PyObject ` object, or ``NULL `` if an error
138
- has occurred.
136
+ Set the value of *var * to *value * in the current context. Returns
137
+ a new token object for this change, or ``NULL `` if an error has occurred.
139
138
140
139
.. c :function :: int PyContextVar_Reset (PyObject *var, PyObject *token)
141
140
0 commit comments