@@ -395,40 +395,47 @@ msgid ""
395395"The :ref:`default object allocator <default-memory-allocators>` uses the "
396396":ref:`pymalloc memory allocator <pymalloc>`."
397397msgstr ""
398+ ":ref:`默认对象分配器 <default-memory-allocators>` 使用 :ref:`pymalloc 内存分配器 "
399+ "<pymalloc>`."
398400
399401#: ../../c-api/memory.rst:288
400402msgid ""
401403"Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, "
402404"as if ``PyObject_Malloc(1)`` had been called instead. The memory will not "
403405"have been initialized in any way."
404406msgstr ""
407+ "请求零字节可能返回一个独特的非 ``NULL`` 指针,就像调用了``PyObject_Malloc(1)`` 一样。但是内存不会以任何方式被初始化。"
405408
406409#: ../../c-api/memory.rst:299
407410msgid ""
408411"Requesting zero elements or elements of size zero bytes returns a distinct "
409412"non-``NULL`` pointer if possible, as if ``PyObject_Calloc(1, 1)`` had been "
410413"called instead."
411- msgstr ""
414+ msgstr "请求零字节可能返回一个独特的非 ``NULL`` 指针,就像调用了``PyObject_Calloc(1, 1)`` 一样。 "
412415
413416#: ../../c-api/memory.rst:311
414417msgid ""
415418"If *p* is ``NULL``, the call is equivalent to ``PyObject_Malloc(n)``; else "
416419"if *n* is equal to zero, the memory block is resized but is not freed, and "
417420"the returned pointer is non-``NULL``."
418421msgstr ""
422+ "如果*p*是``NULL``,则相当于调用 ``PyObject_Malloc(n)`` ;如果 *n* 等于 "
423+ "0,则内存块大小会被调整,但不会被释放,返回非 ``NULL`` 指针。"
419424
420425#: ../../c-api/memory.rst:315
421426msgid ""
422427"Unless *p* is ``NULL``, it must have been returned by a previous call to "
423428":c:func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or "
424429":c:func:`PyObject_Calloc`."
425430msgstr ""
431+ "除非 *p* 是 ``NULL`` ,否则它必须是之前调用 :c:func:`PyObject_Malloc` 、 "
432+ ":c:func:`PyObject_Realloc` 或 :c:func:`PyObject_Calloc` 所返回的。"
426433
427434#: ../../c-api/memory.rst:318
428435msgid ""
429436"If the request fails, :c:func:`PyObject_Realloc` returns ``NULL`` and *p* "
430437"remains a valid pointer to the previous memory area."
431- msgstr ""
438+ msgstr "如果请求失败,:c:func:`PyObject_Realloc` 返回 ``NULL`` , *p* 仍然是指向先前内存区域的有效指针。 "
432439
433440#: ../../c-api/memory.rst:324
434441msgid ""
@@ -437,6 +444,9 @@ msgid ""
437444":c:func:`PyObject_Calloc`. Otherwise, or if ``PyObject_Free(p)`` has been "
438445"called before, undefined behavior occurs."
439446msgstr ""
447+ "释放 *p* 指向的内存块。除非 *p* 是 ``NULL`` ,否则它必须是之前调用 :c:func:`PyObject_Malloc` 、 "
448+ ":c:func:`PyObject_Realloc` 或 :c:func:`PyObject_Calloc` 所返回的指针。否则,或在 "
449+ "``PyObject_Free(p)`` 之前已经调用过的情况下,未定义的行为会发生。"
440450
441451#: ../../c-api/memory.rst:335
442452msgid "Default Memory Allocators"
@@ -464,7 +474,7 @@ msgstr "PyMem_Malloc"
464474
465475#: ../../c-api/memory.rst:340
466476msgid "PyObject_Malloc"
467- msgstr ""
477+ msgstr "PyObject_Malloc "
468478
469479#: ../../c-api/memory.rst:342
470480msgid "Release build"
@@ -502,15 +512,15 @@ msgstr "``pymalloc`` + debug"
502512
503513#: ../../c-api/memory.rst:344
504514msgid "Release build, without pymalloc"
505- msgstr ""
515+ msgstr "没有 pymalloc 的发布版本 "
506516
507517#: ../../c-api/memory.rst:344
508518msgid "``\" malloc\" ``"
509519msgstr "``\" malloc\" ``"
510520
511521#: ../../c-api/memory.rst:345
512522msgid "Debug build, without pymalloc"
513- msgstr ""
523+ msgstr "没有 pymalloc 的调试构建 "
514524
515525#: ../../c-api/memory.rst:345
516526msgid "``\" malloc_debug\" ``"
0 commit comments