Skip to content

Commit 1add1aa

Browse files
committed
Merge from upstream CPython 20181019
1 parent 93d8fee commit 1add1aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+4114
-3738
lines changed

c-api/contextvars.po

+41-30
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ msgid ""
55
msgstr ""
66
"Project-Id-Version: Python 3.7\n"
77
"Report-Msgid-Bugs-To: \n"
8-
"POT-Creation-Date: 2018-06-26 18:54+0800\n"
8+
"POT-Creation-Date: 2018-10-19 17:24+0800\n"
99
"PO-Revision-Date: 2018-07-15 18:56+0800\n"
1010
"Last-Translator: \n"
1111
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -19,148 +19,159 @@ msgstr ""
1919
msgid "Context Variables Objects"
2020
msgstr ""
2121

22-
#: ../../c-api/contextvars.rst:10
22+
#: ../../c-api/contextvars.rst:13
23+
msgid ""
24+
"In Python 3.7.1 the signatures of all context variables C APIs were "
25+
"**changed** to use :c:type:`PyObject` pointers instead of :c:type:"
26+
"`PyContext`, :c:type:`PyContextVar`, and :c:type:`PyContextToken`, e.g.::"
27+
msgstr ""
28+
29+
#: ../../c-api/contextvars.rst:24
30+
msgid "See :issue:`34762` for more details."
31+
msgstr ""
32+
33+
#: ../../c-api/contextvars.rst:29
2334
msgid ""
2435
"This section details the public C API for the :mod:`contextvars` module."
2536
msgstr ""
2637

27-
#: ../../c-api/contextvars.rst:14
38+
#: ../../c-api/contextvars.rst:33
2839
msgid ""
2940
"The C structure used to represent a :class:`contextvars.Context` object."
3041
msgstr ""
3142

32-
#: ../../c-api/contextvars.rst:19
43+
#: ../../c-api/contextvars.rst:38
3344
msgid ""
3445
"The C structure used to represent a :class:`contextvars.ContextVar` object."
3546
msgstr ""
3647

37-
#: ../../c-api/contextvars.rst:24
48+
#: ../../c-api/contextvars.rst:43
3849
msgid "The C structure used to represent a :class:`contextvars.Token` object."
3950
msgstr ""
4051

41-
#: ../../c-api/contextvars.rst:28
52+
#: ../../c-api/contextvars.rst:47
4253
msgid "The type object representing the *context* type."
4354
msgstr ""
4455

45-
#: ../../c-api/contextvars.rst:32
56+
#: ../../c-api/contextvars.rst:51
4657
msgid "The type object representing the *context variable* type."
4758
msgstr ""
4859

49-
#: ../../c-api/contextvars.rst:36
60+
#: ../../c-api/contextvars.rst:55
5061
msgid "The type object representing the *context variable token* type."
5162
msgstr ""
5263

53-
#: ../../c-api/contextvars.rst:39
64+
#: ../../c-api/contextvars.rst:58
5465
msgid "Type-check macros:"
5566
msgstr ""
5667

57-
#: ../../c-api/contextvars.rst:43
68+
#: ../../c-api/contextvars.rst:62
5869
msgid ""
5970
"Return true if *o* is of type :c:data:`PyContext_Type`. *o* must not be "
6071
"*NULL*. This function always succeeds."
6172
msgstr ""
6273

63-
#: ../../c-api/contextvars.rst:48
74+
#: ../../c-api/contextvars.rst:67
6475
msgid ""
6576
"Return true if *o* is of type :c:data:`PyContextVar_Type`. *o* must not be "
6677
"*NULL*. This function always succeeds."
6778
msgstr ""
6879

69-
#: ../../c-api/contextvars.rst:53
80+
#: ../../c-api/contextvars.rst:72
7081
msgid ""
7182
"Return true if *o* is of type :c:data:`PyContextToken_Type`. *o* must not be "
7283
"*NULL*. This function always succeeds."
7384
msgstr ""
7485

75-
#: ../../c-api/contextvars.rst:57
86+
#: ../../c-api/contextvars.rst:76
7687
msgid "Context object management functions:"
7788
msgstr ""
7889

79-
#: ../../c-api/contextvars.rst:61
90+
#: ../../c-api/contextvars.rst:80
8091
msgid ""
8192
"Create a new empty context object. Returns ``NULL`` if an error has "
8293
"occurred."
8394
msgstr ""
8495

85-
#: ../../c-api/contextvars.rst:66
96+
#: ../../c-api/contextvars.rst:85
8697
msgid ""
8798
"Create a shallow copy of the passed *ctx* context object. Returns ``NULL`` "
8899
"if an error has occurred."
89100
msgstr ""
90101

91-
#: ../../c-api/contextvars.rst:71
102+
#: ../../c-api/contextvars.rst:90
92103
msgid ""
93104
"Create a shallow copy of the current thread context. Returns ``NULL`` if an "
94105
"error has occurred."
95106
msgstr ""
96107

97-
#: ../../c-api/contextvars.rst:76
108+
#: ../../c-api/contextvars.rst:95
98109
msgid ""
99110
"Set *ctx* as the current context for the current thread. Returns ``0`` on "
100111
"success, and ``-1`` on error."
101112
msgstr ""
102113

103-
#: ../../c-api/contextvars.rst:81
114+
#: ../../c-api/contextvars.rst:100
104115
msgid ""
105116
"Deactivate the *ctx* context and restore the previous context as the current "
106117
"context for the current thread. Returns ``0`` on success, and ``-1`` on "
107118
"error."
108119
msgstr ""
109120

110-
#: ../../c-api/contextvars.rst:87
121+
#: ../../c-api/contextvars.rst:106
111122
msgid ""
112123
"Clear the context variable free list. Return the total number of freed "
113124
"items. This function always succeeds."
114125
msgstr ""
115126

116-
#: ../../c-api/contextvars.rst:91
127+
#: ../../c-api/contextvars.rst:110
117128
msgid "Context variable functions:"
118129
msgstr ""
119130

120-
#: ../../c-api/contextvars.rst:95
131+
#: ../../c-api/contextvars.rst:114
121132
msgid ""
122133
"Create a new ``ContextVar`` object. The *name* parameter is used for "
123134
"introspection and debug purposes. The *def* parameter may optionally "
124135
"specify the default value for the context variable. If an error has "
125136
"occurred, this function returns ``NULL``."
126137
msgstr ""
127138

128-
#: ../../c-api/contextvars.rst:102
139+
#: ../../c-api/contextvars.rst:121
129140
msgid ""
130141
"Get the value of a context variable. Returns ``-1`` if an error has "
131142
"occurred during lookup, and ``0`` if no error occurred, whether or not a "
132143
"value was found."
133144
msgstr ""
134145

135-
#: ../../c-api/contextvars.rst:106
146+
#: ../../c-api/contextvars.rst:125
136147
msgid ""
137148
"If the context variable was found, *value* will be a pointer to it. If the "
138149
"context variable was *not* found, *value* will point to:"
139150
msgstr ""
140151

141-
#: ../../c-api/contextvars.rst:109
152+
#: ../../c-api/contextvars.rst:128
142153
msgid "*default_value*, if not ``NULL``;"
143154
msgstr ""
144155

145-
#: ../../c-api/contextvars.rst:110
156+
#: ../../c-api/contextvars.rst:129
146157
msgid "the default value of *var*, if not ``NULL``;"
147158
msgstr ""
148159

149-
#: ../../c-api/contextvars.rst:111
160+
#: ../../c-api/contextvars.rst:130
150161
msgid "``NULL``"
151162
msgstr ""
152163

153-
#: ../../c-api/contextvars.rst:113
164+
#: ../../c-api/contextvars.rst:132
154165
msgid "If the value was found, the function will create a new reference to it."
155166
msgstr ""
156167

157-
#: ../../c-api/contextvars.rst:117
168+
#: ../../c-api/contextvars.rst:136
158169
msgid ""
159170
"Set the value of *var* to *value* in the current context. Returns a pointer "
160-
"to a :c:type:`PyContextToken` object, or ``NULL`` if an error has occurred."
171+
"to a :c:type:`PyObject` object, or ``NULL`` if an error has occurred."
161172
msgstr ""
162173

163-
#: ../../c-api/contextvars.rst:123
174+
#: ../../c-api/contextvars.rst:142
164175
msgid ""
165176
"Reset the state of the *var* context variable to that it was in before :c:"
166177
"func:`PyContextVar_Set` that returned the *token* was called. This function "

0 commit comments

Comments
 (0)