FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-docs-de/c-api/slots.po at sync-upstream-3.15 · python/python-docs-de · GitHub
python
python-docs-de
Repository navigation
Code
Issues
Pull requests
2
(2)
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
python-docs-de
/
c-api
/
slots.po
Copy path
More file actions
More file actions
Latest commit
History
History
History
304 lines (259 loc) · 8.83 KB
Breadcrumbs
python-docs-de
/
c-api
/
slots.po
Copy path
File metadata and controls
304 lines (259 loc) · 8.83 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
#
German translations for Python package.
#
Copyright (C) 2001 Python Software Foundation
#
This file is distributed under the same license as the Python package.
#
Automatically generated, 2026.
#
msgid ""
msgstr ""
"
Project-Id-Version
:
Python 3.15\n
"
"
Report-Msgid-Bugs-To
:
\n
"
"
POT-Creation-Date
:
2026-10-26 03:10+0000\n
"
"
PO-Revision-Date
:
2026-09-23 06:17+0000\n
"
"
Last-Translator
:
Automatically generated\n
"
"
Language-Team
:
none\n
"
"
Language
:
de\n
"
"
MIME-Version
:
1.0\n
"
"
Content-Type
:
text/plain; charset=UTF-8\n
"
"
Content-Transfer-Encoding
:
8bit\n
"
"
Plural-Forms
:
nplurals=2; plural=(n != 1);\n
"
#:
../../c-api/slots.rst:6
msgid
"Definition slots"
msgstr
""
#:
../../c-api/slots.rst:8
msgid
""
"To define :ref:`module objects <moduleobjects>` and :ref:`classes <creating-"
"heap-types>` using the C API, you may use an array of *slots* -- "
"essentially, key-value pairs that describe features of the object to create. "
"This decouples the data from the structures used at runtime, allowing "
"CPython -- and other Python C API implementations -- to update the "
"structures without breaking backwards compatibility."
msgstr
""
#:
../../c-api/slots.rst:16
msgid
""
"This section documents slots in general. For object-specific behavior and "
"slot values, see documentation for functions that apply slots:"
msgstr
""
#:
../../c-api/slots.rst:20
msgid
":c:func:`PyType_FromSlots` for types;"
msgstr
""
#:
../../c-api/slots.rst:21
msgid
""
":c:func:`PyModule_FromSlotsAndSpec` and :ref:`extension-export-hook` for "
"modules."
msgstr
""
#:
../../c-api/slots.rst:24
msgid
""
"When slots are passed to a function that applies them, the function will not "
"modify the slot array, nor any data it points to (recursively). After the "
"function is done, the caller is allowed to modify or deallocate the array "
"and any data it points to (recursively), except data explicitly marked with :"
"c:macro:`PySlot_STATIC`."
msgstr
""
#:
../../c-api/slots.rst:30
msgid
""
"Except when documented otherwise, multiple slots with the same ID (:c:member:"
"`~PySlot.sl_id`) may not occur in a single slots array."
msgstr
""
#:
../../c-api/slots.rst:35
msgid
""
"Slot arrays generalize an earlier way of defining objects: using :c:type:"
"`PyType_Spec` with :c:type:`PyType_Slot` for types, and :c:type:"
"`PyModuleDef` with :c:type:`PyModuleDef_Slot` for modules. The earlier API "
"is :term:`soft deprecated`; there are no plans to remove it."
msgstr
""
#:
../../c-api/slots.rst:40
msgid
"Entries of the slots array use the following structure:"
msgstr
""
#:
../../c-api/slots.rst:44
msgid
"An entry in a slots array. Defined as:"
msgstr
""
#:
../../c-api/slots.rst:46
msgid
""
"typedef struct {\n"
" uint16_t sl_id;\n"
" uint16_t sl_flags;\n"
" union {\n"
" uint32_t sl_reserved; // must be 0\n"
" };\n"
" union {\n"
" void *sl_ptr;\n"
" void (*sl_func)(void);\n"
" Py_ssize_t sl_size;\n"
" int64_t sl_int64;\n"
" uint64_t sl_uint64;\n"
" };\n"
"} PySlot;"
msgstr
""
#:
../../c-api/slots.rst:65
msgid
"A slot ID, chosen from:"
msgstr
""
#:
../../c-api/slots.rst:67
msgid
"``Py_slot_*`` values documented in :ref:`pyslot-common-ids` below;"
msgstr
""
#:
../../c-api/slots.rst:68
msgid
""
"``Py_mod_*`` values for modules, as documented in :ref:`c_module_slots`;"
msgstr
""
#:
../../c-api/slots.rst:69
msgid
"Values for types, as documented in :ref:`pyslot_type_slot_ids`."
msgstr
""
#:
../../c-api/slots.rst:71
msgid
""
"A :c:member:`!sl_id` of zero (:c:macro:`Py_slot_end`) marks the end of a "
"slots array."
msgstr
""
#:
../../c-api/slots.rst:80
msgid
""
"The data for the slot. These members are part of an anonymous union; the "
"member to use depends on which data type is required by the slot ID: data "
"pointer, function pointer, size, signed or unsigned integer, respectively."
msgstr
""
#:
../../c-api/slots.rst:86
msgid
""
"Except when documented otherwise for a specific slot ID, pointers (that is :"
"c:member:`!sl_ptr` and :c:member:`!sl_func`) may not be NULL."
msgstr
""
#:
../../c-api/slots.rst:91
msgid
"Zero or more of the following flags, OR-ed together:"
msgstr
""
#:
../../c-api/slots.rst:97
msgid
""
"All data the slot points to is statically allocated and constant. Thus, the "
"interpreter does not need to copy the information."
msgstr
""
#:
../../c-api/slots.rst:100
msgid
"This flag is implied for function pointers."
msgstr
""
#:
../../c-api/slots.rst:102
msgid
""
"The flag applies even to data the slot points to “indirectly”, except for "
"slots nested via :c:macro:`Py_slot_subslots` which may have their own :c:"
"macro:`!PySlot_STATIC` flags. For example, if applied to a :c:macro:"
"`Py_tp_members` slot that points to an array of :c:type:`PyMemberDef` "
"structures, then the entire array, as well as the name and doc strings in "
"its elements, must be static and constant."
msgstr
""
#:
../../c-api/slots.rst:112
msgid
""
"The data is stored in ``sl_ptr``; CPython will cast it to the appropriate "
"type."
msgstr
""
#:
../../c-api/slots.rst:115
msgid
""
"This flag can simplify porting from the older :c:type:`PyType_Slot` and :c:"
"type:`PyModuleDef_Slot` structures."
msgstr
""
#:
../../c-api/slots.rst:120
msgid
""
"If the slot ID is unknown, the interpreter should ignore the slot, rather "
"than fail."
msgstr
""
#:
../../c-api/slots.rst:123
msgid
""
"For example, if Python 3.16 adds a new feature with a new slot ID,attr the "
"corresponding slot may be marked :c:macro:`!PySlot_OPTIONAL` so that Python "
"3.15 ignores it."
msgstr
""
#:
../../c-api/slots.rst:127
msgid
""
"Note that the
\"
optionality
\"
only applies to unknown slot IDs. This flag "
"does not make Python skip invalid values of known slots."
msgstr
""
#:
../../c-api/slots.rst:134
msgid
"Convenience macros"
msgstr
""
#:
../../c-api/slots.rst:143
msgid
""
"Convenience macros to define :c:type:`!PySlot` structures with :c:member:"
"`~PySlot.sl_id` and a particular union member set."
msgstr
""
#:
../../c-api/slots.rst:146
msgid
""
":c:macro:`!PySlot_STATIC_DATA` sets the :c:macro:`PySlot_STATIC` flag; "
"others set no flags."
msgstr
""
#:
../../c-api/slots.rst:149
msgid
""
"Note that these macros use *designated initializers*, a C language feature "
"that C++ added in the 2020 version of the standard. If your code needs to be "
"compatible with C++11 or older, use :c:macro:`PySlot_PTR` instead."
msgstr
""
#:
../../c-api/slots.rst:154
../../c-api/slots.rst:180
#:
../../c-api/slots.rst:194
msgid
"Defined as::"
msgstr
""
#:
../../c-api/slots.rst:156
msgid
""
"#define PySlot_DATA(NAME, VALUE)
\\
\n"
" {.sl_id=NAME, .sl_ptr=(void*)(VALUE)}\n"
"\n"
"#define PySlot_FUNC(NAME, VALUE)
\\
\n"
" {.sl_id=NAME, .sl_func=(VALUE)}\n"
"\n"
"#define PySlot_SIZE(NAME, VALUE)
\\
\n"
" {.sl_id=NAME, .sl_size=(VALUE)}\n"
"\n"
"#define PySlot_INT64(NAME, VALUE)
\\
\n"
" {.sl_id=NAME, .sl_int64=(VALUE)}\n"
"\n"
"#define PySlot_UINT64(NAME, VALUE)
\\
\n"
" {.sl_id=NAME, .sl_uint64=(VALUE)}\n"
"\n"
"#define PySlot_STATIC_DATA(NAME, VALUE)
\\
\n"
" {.sl_id=NAME, .sl_flags=PySlot_STATIC, .sl_ptr=(VALUE)}"
msgstr
""
#:
../../c-api/slots.rst:178
msgid
"Convenience macro to mark the end of a :c:type:`!PySlot` array."
msgstr
""
#:
../../c-api/slots.rst:182
msgid
"#define PySlot_END {0}"
msgstr
""
#:
../../c-api/slots.rst:189
msgid
""
"Convenience macros for use in C++11-compatible code. This version of C++ "
"does not allow setting arbitrary union members in literals; instead, these "
"macros set the :c:macro:`PySlot_INTPTR` flag and cast the value to "
"``(void*)``."
msgstr
""
#:
../../c-api/slots.rst:196
msgid
""
"#define PySlot_PTR(NAME, VALUE)
\\
\n"
" {NAME, PySlot_INTPTR, {0}, {(void*)(VALUE)}}\n"
"\n"
"#define PySlot_PTR_STATIC(NAME, VALUE)
\\
\n"
" {NAME, PySlot_INTPTR|Py_SLOT_STATIC, {0}, {(void*)(VALUE)}}"
msgstr
""
#:
../../c-api/slots.rst:207
msgid
"Common slot IDs"
msgstr
""
#:
../../c-api/slots.rst:209
msgid
"The following slot IDs may be used in both type and module definitions."
msgstr
""
#:
../../c-api/slots.rst:213
msgid
"Marks the end of a slots array. Defined as zero."
msgstr
""
#:
../../c-api/slots.rst:220
msgid
"Nested slots array."
msgstr
""
#:
../../c-api/slots.rst:222
msgid
""
"The value (:c:member:`~PySlot.sl_ptr`) should point to an array of :c:type:"
"`PySlot` structures. The slots in the array (up to but not including the "
"zero-ID terminator) will be treated as if they were inserted if the current "
"slot array, at the point :c:macro:`!Py_slot_subslots` appears."
msgstr
""
#:
../../c-api/slots.rst:228
msgid
""
"Slot nesting depth is limited to 5 levels. This restriction may be lifted in "
"the future."
msgstr
""
#:
../../c-api/slots.rst:235
msgid
""
"Reserved; will always be treated as an unknown slot ID. Defined as "
"``UINT16_MAX`` (``0xFFFF``)."
msgstr
""
#:
../../c-api/slots.rst:238
msgid
""
"When used with the :c:macro:`PySlot_OPTIONAL` flag, defines a slot with no "
"effect. Without the flag, processing a slot with this ID will fail."
msgstr
""
Back
|
FazBrowse Home
|
New Git URL