@@ -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,50 @@ 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);"
132166msgstr ""
167+ "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type);"
133168
134169#: ../../c-api/allocation.rst:87 ../../c-api/allocation.rst:137
135170#: ../../c-api/allocation.rst:184 ../../c-api/allocation.rst:186
136171#: ../../c-api/allocation.rst:188
137172msgid ":c:func:`PyObject_Free`"
138- msgstr ""
173+ msgstr ":c:func:`PyObject_Free` "
139174
140175#: ../../c-api/allocation.rst:88
141176msgid ":c:macro:`PyObject_GC_New`"
142- msgstr ""
177+ msgstr ":c:macro:`PyObject_GC_New` "
143178
144179#: ../../c-api/allocation.rst:89 ../../c-api/allocation.rst:139
145180msgid ":c:func:`PyType_GenericAlloc`"
146- msgstr ""
181+ msgstr ":c:func:`PyType_GenericAlloc` "
147182
148183#: ../../c-api/allocation.rst:90 ../../c-api/allocation.rst:140
149184msgid ":c:member:`~PyTypeObject.tp_alloc`"
150- msgstr ""
185+ msgstr ":c:member:`~PyTypeObject.tp_alloc` "
151186
152187#: ../../c-api/allocation.rst:95
153188msgid "Like :c:macro:`PyObject_New` except:"
154- msgstr ""
189+ msgstr "مثل :c:macro:`PyObject_New` جز: "
155190
156191#: ../../c-api/allocation.rst:97
157192msgid ""
158193"It allocates enough memory for the *TYPE* structure plus *size* "
159194"(``Py_ssize_t``) fields of the size given by "
160195"the :c:member:`~PyTypeObject.tp_itemsize` field of *typeobj*."
161196msgstr ""
197+ "این (ماکرو) به اندازهی کافی برای ساختار *TYPE* به اضافهی *size* "
198+ "(``Py_ssize_t``) فیلد به اندازهای که توسط فیلد :c:member:`~PyTypeObject.tp_itemsize` از *typeobj* مشخص شده، حافظه تخصیص میدهد."
162199
163200#: ../../c-api/allocation.rst:100
164201msgid "The memory is initialized like :c:func:`PyObject_InitVar`."
165- msgstr ""
202+ msgstr "حافظه، مانند :c:func:`PyObject_InitVar` مقداردهی اولیه میشود. "
166203
167204#: ../../c-api/allocation.rst:102
168205msgid ""
@@ -171,84 +208,94 @@ msgid ""
171208"the same allocation decreases the number of allocations, improving the memory "
172209"management efficiency."
173210msgstr ""
211+ "این (روش) برای پیادهسازی اشیایی مثل تاپلها مفید است، که میتوانند "
212+ "اندازهی خود را در زمان ساخت تعیین کنند. جاسازی آرایهی فیلدها در "
213+ "همان تخصیص، تعداد تخصیصها را کاهش میدهد و بازدهی مدیریت حافظه را بهبود میبخشد."
174214
175215#: ../../c-api/allocation.rst:114
176216msgid ""
177217"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set "
178218"in :c:member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_NewVar` "
179219"instead."
180220msgstr ""
221+ "این را نمیتوان برای اشیایی که :c:macro:`Py_TPFLAGS_HAVE_GC` در "
222+ ":c:member:`~PyTypeObject.tp_flags` آنها تنظیم شده است، استفاده کرد؛ "
223+ "به جای آن از :c:macro:`PyObject_GC_NewVar` استفاده کنید."
181224
182225#: ../../c-api/allocation.rst:118
183226msgid ""
184227"Memory allocated by this function must be freed with :c:func:`PyObject_Free` "
185228"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)."
186229msgstr ""
230+ "حافظهای که توسط این تابع تخصیص داده میشود، باید با :c:func:`PyObject_Free` آزاد شود "
231+ "(معمولاً از طریق درگاه :c:member:`~PyTypeObject.tp_free` شیء فراخوانی میشود)."
187232
188233#: ../../c-api/allocation.rst:133
189234msgid "PyObject *list_instance = PyObject_CallNoArgs((PyObject *)&PyList_Type);"
190- msgstr ""
235+ msgstr "PyObject *list_instance = PyObject_CallNoArgs((PyObject *)&PyList_Type); "
191236
192237#: ../../c-api/allocation.rst:138
193238msgid ":c:macro:`PyObject_GC_NewVar`"
194- msgstr ""
239+ msgstr ":c:macro:`PyObject_GC_NewVar` "
195240
196241#: ../../c-api/allocation.rst:145
197242msgid ""
198243"Object which is visible in Python as ``None``. This should only be accessed "
199244"using the :c:macro:`Py_None` macro, which evaluates to a pointer to this "
200245"object."
201246msgstr ""
202- "شیء ای که در پایتون به صورت ``None`` قابل مشاهده است\n"
203- "این فقط باید با استفاده از ماکرو :c:macro:`Py_None`، که به یک اشاره گر به این "
204- "شی ارزیابی می شود ، دسترسی پیدا کند ."
247+ "شیءای که در پایتون به صورت ``None`` قابل مشاهده است\n"
248+ "این فقط باید با استفاده از ماکرو :c:macro:`Py_None`، که به یک اشارهگر به این "
249+ "شیء ارزیابی میشود ، دسترسی پذیر باشد ."
205250
206251#: ../../c-api/allocation.rst:152
207252msgid ":ref:`moduleobjects`"
208- msgstr ""
253+ msgstr ":ref:`moduleobjects` "
209254
210255#: ../../c-api/allocation.rst:153
211256msgid "To allocate and create extension modules."
212- msgstr "برای تخصیص و ایجاد ماژول های افزونه."
257+ msgstr "برای تخصیص و ایجاد ماژولهای افزونه."
213258
214259#: ../../c-api/allocation.rst:157
215260msgid "Soft-deprecated aliases"
216- msgstr ""
261+ msgstr "نامهای مستعار با منسوخسازی نرم "
217262
218263#: ../../c-api/allocation.rst:161
219264msgid ""
220265"These are aliases to existing functions and macros. They exist solely for "
221266"backwards compatibility."
222267msgstr ""
268+ "اینها نامهای مستعاری برای توابع و ماکروهای موجود هستند. آنها صرفاً برای "
269+ "سازگاری با نسخههای قبلی وجود دارند."
223270
224271#: ../../c-api/allocation.rst:169
225272msgid "Soft-deprecated alias"
226- msgstr ""
273+ msgstr "نامهای مستعار با منسوخسازی نرم "
227274
228275#: ../../c-api/allocation.rst:170
229276msgid "Function"
230- msgstr ""
277+ msgstr "تابع "
231278
232279#: ../../c-api/allocation.rst:172
233280msgid ":c:macro:`PyObject_New`"
234- msgstr "همانند :c:macro:`PyObject_New`"
281+ msgstr ":c:macro:`PyObject_New`"
235282
236283#: ../../c-api/allocation.rst:174
237284msgid ":c:macro:`PyObject_NewVar`"
238- msgstr ""
285+ msgstr ":c:macro:`PyObject_NewVar` "
239286
240287#: ../../c-api/allocation.rst:176
241288msgid ":c:func:`PyObject_Init`"
242- msgstr "همانند :c:func:`PyObject_Init`"
289+ msgstr ":c:func:`PyObject_Init`"
243290
244291#: ../../c-api/allocation.rst:178
245292msgid ":c:func:`PyObject_InitVar`"
246- msgstr "همانند :c:func:`PyObject_InitVar`"
293+ msgstr ":c:func:`PyObject_InitVar`"
247294
248295#: ../../c-api/allocation.rst:180
249296msgid ":c:func:`PyObject_Malloc`"
250- msgstr "همانند :c:func:`PyObject_Malloc`"
297+ msgstr ":c:func:`PyObject_Malloc`"
251298
252299#: ../../c-api/allocation.rst:182
253300msgid ":c:func:`PyObject_Realloc`"
254- msgstr "همانند :c:func:`PyObject_Realloc`"
301+ msgstr ":c:func:`PyObject_Realloc`"
0 commit comments