@@ -29,7 +29,6 @@ msgstr ""
2929"X-Generator : Poedit 3.6\n "
3030
3131#: ../../c-api/allocation.rst:6
32- #, fuzzy
3332msgid "Allocating objects on the heap"
3433msgstr "تخصیص اشیاء روی پشته"
3534
@@ -42,6 +41,10 @@ msgid ""
4241"slot). Specifically, this function does **not** call the object's :meth:`!"
4342"__init__` method."
4443msgstr ""
44+ "یک شیء *op* که بهتازگی تخصیص داده شده را با نوع و مرجع اولیهاش مقداردهی اولیه میکند. "
45+ "شیء مقداردهیشده را برمیگرداند. سایر فیلدهای شیء مقداردهی اولیه نمیشوند. "
46+ "با وجود نام این تابع، آن به متد :meth:`~object.__init__` شیء (درگاه :c:member:`~PyTypeObject.tp_init`) مربوط نیست. "
47+ "بهطور خاص، این تابع متد :meth:`!__init__` شیء را **فراخوانی نمیکند**."
4548
4649#: ../../c-api/allocation.rst:24
4750msgid ""
@@ -50,12 +53,18 @@ msgid ""
5053"implementing :c:member:`!tp_alloc` for your type, "
5154"prefer :c:func:`PyType_GenericAlloc` or :c:func:`PyObject_New`."
5255msgstr ""
56+ "در کل، این تابع را یک روتین سطح پایین در نظر بگیرید. "
57+ "تا جایی که ممکن است از :c:member:`~PyTypeObject.tp_alloc` استفاده کنید. برای "
58+ "پیادهسازی :c:member:`!tp_alloc` برای نوع خود، "
59+ "از :c:func:`PyType_GenericAlloc` یا :c:func:`PyObject_New` استفاده کنید."
5360
5461#: ../../c-api/allocation.rst:31
5562msgid ""
5663"This function only initializes the object's memory corresponding to the "
5764"initial :c:type:`PyObject` structure. It does not zero the rest."
5865msgstr ""
66+ "این تابع فقط حافظهی شیء را که مربوط به ساختار ابتدایی "
67+ ":c:type:`PyObject` است، مقداردهی اولیه میکند. بقیهی حافظه را صفر نمیکند."
5968
6069#: ../../c-api/allocation.rst:37
6170msgid ""
@@ -70,6 +79,8 @@ msgid ""
7079"This function only initializes some of the object's memory. It does not zero "
7180"the rest."
7281msgstr ""
82+ "این تابع فقط بخشی از حافظهی شیء را مقداردهی اولیه میکند. بقیهی "
83+ "حافظه را صفر نمیکند."
7384
7485#: ../../c-api/allocation.rst:48
7586msgid ""
@@ -79,19 +90,27 @@ msgid ""
7990"caller will own the only reference to the object (i.e. its reference count "
8091"will be one)."
8192msgstr ""
93+ "یک شیء پایتونی جدید با استفاده از نوع ساختار C یعنی *TYPE* و شیء نوع پایتون "
94+ "یعنی *typeobj* (``PyTypeObject*``) با فراخوانی :c:func:`PyObject_Malloc` "
95+ "برای تخصیص حافظه و مقداردهی اولیهی آن مانند :c:func:`PyObject_Init` تخصیص میدهد. "
96+ "فراخواننده، تنها مرجع به شیء را در اختیار خواهد داشت (یعنی شمارندهی ارجاع آن یک خواهد بود)."
8297
8398#: ../../c-api/allocation.rst:54 ../../c-api/allocation.rst:107
8499msgid ""
85100"Avoid calling this directly to allocate memory for an object; call the "
86101"type's :c:member:`~PyTypeObject.tp_alloc` slot instead."
87102msgstr ""
103+ "از فراخوانی مستقیم این تابع برای تخصیص حافظه به یک شیء خودداری کنید؛ به جای آن، "
104+ "درگاه :c:member:`~PyTypeObject.tp_alloc` تایپ را فراخوانی کنید."
88105
89106#: ../../c-api/allocation.rst:57 ../../c-api/allocation.rst:110
90107msgid ""
91108"When populating a type's :c:member:`~PyTypeObject.tp_alloc` "
92109"slot, :c:func:`PyType_GenericAlloc` is preferred over a custom function that "
93110"simply calls this macro."
94111msgstr ""
112+ "هنگام پر کردن درگاه :c:member:`~PyTypeObject.tp_alloc` یک تایپ، "
113+ ":c:func:`PyType_GenericAlloc` بر یک تابع سفارشی که صرفاً این ماکرو را فراخوانی میکند، ترجیح داده میشود."
95114
96115#: ../../c-api/allocation.rst:61
97116msgid ""
@@ -100,24 +119,35 @@ msgid ""
100119"(:meth:`~object.__new__`), or :c:member:`~PyTypeObject.tp_init` "
101120"(:meth:`~object.__init__`)."
102121msgstr ""
122+ "این ماکرو "
123+ ":c:member:`~PyTypeObject.tp_alloc`، :c:member:`~PyTypeObject.tp_new` "
124+ "(:meth:`~object.__new__`) یا :c:member:`~PyTypeObject.tp_init` "
125+ "(:meth:`~object.__init__`) را فراخوانی نمیکند."
103126
104127#: ../../c-api/allocation.rst:65
105128msgid ""
106129"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set "
107130"in :c:member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_New` instead."
108131msgstr ""
132+ "این را نمیتوان برای اشیایی که :c:macro:`Py_TPFLAGS_HAVE_GC` در "
133+ ":c:member:`~PyTypeObject.tp_flags` آنها تنظیم شده است، استفاده کرد؛ "
134+ "به جای آن از :c:macro:`PyObject_GC_New` استفاده کنید."
109135
110136#: ../../c-api/allocation.rst:68
111137msgid ""
112138"Memory allocated by this macro must be freed with :c:func:`PyObject_Free` "
113139"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)."
114140msgstr ""
141+ "حافظهای که توسط این ماکرو تخصیص داده میشود، باید با :c:func:`PyObject_Free` آزاد شود "
142+ "(معمولاً از طریق درگاه :c:member:`~PyTypeObject.tp_free` شیء فراخوانی میشود)."
115143
116144#: ../../c-api/allocation.rst:73 ../../c-api/allocation.rst:123
117145msgid ""
118146"The returned memory is not guaranteed to have been completely zeroed before it "
119147"was initialized."
120148msgstr ""
149+ "حافظهی برگشتی تضمین نمیشود که بهطور کامل صفر شده باشد قبل از اینکه "
150+ "مقداردهی اولیه شود."
121151
122152#: ../../c-api/allocation.rst:78 ../../c-api/allocation.rst:128
123153msgid ""
@@ -126,43 +156,49 @@ msgid ""
126156"by :c:member:`~PyTypeObject.tp_init`. To construct a fully initialized "
127157"object, call *typeobj* instead. For example::"
128158msgstr ""
159+ "این ماکرو یک شیء کاملاً مقداردهیشده از نوع دادهشده را نمیسازد؛ بلکه "
160+ "صرفاً حافظه تخصیص میدهد و آن را برای مقداردهی اولیهی بیشتر "
161+ "توسط :c:member:`~PyTypeObject.tp_init` آماده میکند. برای ساختن یک شیء کاملاً مقداردهیشده، "
162+ "به جای آن *typeobj* را فراخوانی کنید. برای مثال::"
129163
130164#: ../../c-api/allocation.rst:83
131165msgid "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type);"
132- msgstr ""
166+ msgstr "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type); "
133167
134168#: ../../c-api/allocation.rst:87 ../../c-api/allocation.rst:137
135169#: ../../c-api/allocation.rst:184 ../../c-api/allocation.rst:186
136170#: ../../c-api/allocation.rst:188
137171msgid ":c:func:`PyObject_Free`"
138- msgstr ""
172+ msgstr ":c:func:`PyObject_Free` "
139173
140174#: ../../c-api/allocation.rst:88
141175msgid ":c:macro:`PyObject_GC_New`"
142- msgstr ""
176+ msgstr ":c:macro:`PyObject_GC_New` "
143177
144178#: ../../c-api/allocation.rst:89 ../../c-api/allocation.rst:139
145179msgid ":c:func:`PyType_GenericAlloc`"
146- msgstr ""
180+ msgstr ":c:func:`PyType_GenericAlloc` "
147181
148182#: ../../c-api/allocation.rst:90 ../../c-api/allocation.rst:140
149183msgid ":c:member:`~PyTypeObject.tp_alloc`"
150- msgstr ""
184+ msgstr ":c:member:`~PyTypeObject.tp_alloc` "
151185
152186#: ../../c-api/allocation.rst:95
153187msgid "Like :c:macro:`PyObject_New` except:"
154- msgstr ""
188+ msgstr "مثل :c:macro:`PyObject_New` جز: "
155189
156190#: ../../c-api/allocation.rst:97
157191msgid ""
158192"It allocates enough memory for the *TYPE* structure plus *size* "
159193"(``Py_ssize_t``) fields of the size given by "
160194"the :c:member:`~PyTypeObject.tp_itemsize` field of *typeobj*."
161195msgstr ""
196+ "این (ماکرو) به اندازهی کافی برای ساختار *TYPE* به اضافهی *size* "
197+ "(``Py_ssize_t``) فیلد به اندازهای که توسط فیلد :c:member:`~PyTypeObject.tp_itemsize` از *typeobj* مشخص شده، حافظه تخصیص میدهد."
162198
163199#: ../../c-api/allocation.rst:100
164200msgid "The memory is initialized like :c:func:`PyObject_InitVar`."
165- msgstr ""
201+ msgstr "حافظه، مانند :c:func:`PyObject_InitVar` مقداردهی اولیه میشود. "
166202
167203#: ../../c-api/allocation.rst:102
168204msgid ""
@@ -171,84 +207,94 @@ msgid ""
171207"the same allocation decreases the number of allocations, improving the memory "
172208"management efficiency."
173209msgstr ""
210+ "این (روش) برای پیادهسازی اشیایی مثل تاپلها مفید است، که میتوانند "
211+ "اندازهی خود را در زمان ساخت تعیین کنند. جاسازی آرایهی فیلدها در "
212+ "همان تخصیص، تعداد تخصیصها را کاهش میدهد و بازدهی مدیریت حافظه را بهبود میبخشد."
174213
175214#: ../../c-api/allocation.rst:114
176215msgid ""
177216"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set "
178217"in :c:member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_NewVar` "
179218"instead."
180219msgstr ""
220+ "این را نمیتوان برای اشیایی که :c:macro:`Py_TPFLAGS_HAVE_GC` در "
221+ ":c:member:`~PyTypeObject.tp_flags` آنها تنظیم شده است، استفاده کرد؛ "
222+ "به جای آن از :c:macro:`PyObject_GC_NewVar` استفاده کنید."
181223
182224#: ../../c-api/allocation.rst:118
183225msgid ""
184226"Memory allocated by this function must be freed with :c:func:`PyObject_Free` "
185227"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)."
186228msgstr ""
229+ "حافظهای که توسط این تابع تخصیص داده میشود، باید با :c:func:`PyObject_Free` آزاد شود "
230+ "(معمولاً از طریق درگاه :c:member:`~PyTypeObject.tp_free` شیء فراخوانی میشود)."
187231
188232#: ../../c-api/allocation.rst:133
189233msgid "PyObject *list_instance = PyObject_CallNoArgs((PyObject *)&PyList_Type);"
190- msgstr ""
234+ msgstr "PyObject *list_instance = PyObject_CallNoArgs((PyObject *)&PyList_Type); "
191235
192236#: ../../c-api/allocation.rst:138
193237msgid ":c:macro:`PyObject_GC_NewVar`"
194- msgstr ""
238+ msgstr ":c:macro:`PyObject_GC_NewVar` "
195239
196240#: ../../c-api/allocation.rst:145
197241msgid ""
198242"Object which is visible in Python as ``None``. This should only be accessed "
199243"using the :c:macro:`Py_None` macro, which evaluates to a pointer to this "
200244"object."
201245msgstr ""
202- "شیء ای که در پایتون به صورت ``None`` قابل مشاهده است\n"
203- "این فقط باید با استفاده از ماکرو :c:macro:`Py_None`، که به یک اشاره گر به این "
204- "شی ارزیابی می شود ، دسترسی پیدا کند ."
246+ "شیءای که در پایتون به صورت ``None`` قابل مشاهده است\n"
247+ "این فقط باید با استفاده از ماکرو :c:macro:`Py_None`، که به یک اشارهگر به این "
248+ "شیء ارزیابی میشود ، دسترسی پذیر باشد ."
205249
206250#: ../../c-api/allocation.rst:152
207251msgid ":ref:`moduleobjects`"
208- msgstr ""
252+ msgstr ":ref:`moduleobjects` "
209253
210254#: ../../c-api/allocation.rst:153
211255msgid "To allocate and create extension modules."
212- msgstr "برای تخصیص و ایجاد ماژول های افزونه."
256+ msgstr "برای تخصیص و ایجاد ماژولهای افزونه."
213257
214258#: ../../c-api/allocation.rst:157
215259msgid "Soft-deprecated aliases"
216- msgstr ""
260+ msgstr "نامهای مستعار با منسوخسازی نرم "
217261
218262#: ../../c-api/allocation.rst:161
219263msgid ""
220264"These are aliases to existing functions and macros. They exist solely for "
221265"backwards compatibility."
222266msgstr ""
267+ "اینها نامهای مستعاری برای توابع و ماکروهای موجود هستند. آنها صرفاً برای "
268+ "سازگاری با نسخههای قبلی وجود دارند."
223269
224270#: ../../c-api/allocation.rst:169
225271msgid "Soft-deprecated alias"
226- msgstr ""
272+ msgstr "نامهای مستعار با منسوخسازی نرم "
227273
228274#: ../../c-api/allocation.rst:170
229275msgid "Function"
230- msgstr ""
276+ msgstr "تابع "
231277
232278#: ../../c-api/allocation.rst:172
233279msgid ":c:macro:`PyObject_New`"
234- msgstr "همانند :c:macro:`PyObject_New`"
280+ msgstr ":c:macro:`PyObject_New`"
235281
236282#: ../../c-api/allocation.rst:174
237283msgid ":c:macro:`PyObject_NewVar`"
238- msgstr ""
284+ msgstr ":c:macro:`PyObject_NewVar` "
239285
240286#: ../../c-api/allocation.rst:176
241287msgid ":c:func:`PyObject_Init`"
242- msgstr "همانند :c:func:`PyObject_Init`"
288+ msgstr ":c:func:`PyObject_Init`"
243289
244290#: ../../c-api/allocation.rst:178
245291msgid ":c:func:`PyObject_InitVar`"
246- msgstr "همانند :c:func:`PyObject_InitVar`"
292+ msgstr ":c:func:`PyObject_InitVar`"
247293
248294#: ../../c-api/allocation.rst:180
249295msgid ":c:func:`PyObject_Malloc`"
250- msgstr "همانند :c:func:`PyObject_Malloc`"
296+ msgstr ":c:func:`PyObject_Malloc`"
251297
252298#: ../../c-api/allocation.rst:182
253299msgid ":c:func:`PyObject_Realloc`"
254- msgstr "همانند :c:func:`PyObject_Realloc`"
300+ msgstr ":c:func:`PyObject_Realloc`"
0 commit comments