You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<dd><p>使用 C 結構型別 <em>TYPE</em> 和 Python 型別物件 <em>typeobj</em> (<codeclass="docutils literal notranslate"><spanclass="pre">PyTypeObject*</span></code>) 分配一個新的 Python 物件。未在該 Python 物件標頭 (header) 中定義的欄位不會被初始化;呼叫者會擁有那個對於物件的唯一參照(物件的參照計數為一)。記憶體分配大小由 type 物件的 <aclass="reference internal" href="typeobj.html#c.PyTypeObject.tp_basicsize" title="PyTypeObject.tp_basicsize"><codeclass="xref c c-member docutils literal notranslate"><spanclass="pre">tp_basicsize</span></code></a> 欄位來指定。</p>
204
-
<p>Note that this function is unsuitable if <em>typeobj</em> has
205
-
<aclass="reference internal" href="typeobj.html#c.Py_TPFLAGS_HAVE_GC" title="Py_TPFLAGS_HAVE_GC"><codeclass="xref c c-macro docutils literal notranslate"><spanclass="pre">Py_TPFLAGS_HAVE_GC</span></code></a> set. For such objects,
206
-
use <aclass="reference internal" href="gcsupport.html#c.PyObject_GC_New" title="PyObject_GC_New"><codeclass="xref c c-func docutils literal notranslate"><spanclass="pre">PyObject_GC_New()</span></code></a> instead.</p>
<p>Note that this function is unsuitable if <em>typeobj</em> has
214
-
<aclass="reference internal" href="typeobj.html#c.Py_TPFLAGS_HAVE_GC" title="Py_TPFLAGS_HAVE_GC"><codeclass="xref c c-macro docutils literal notranslate"><spanclass="pre">Py_TPFLAGS_HAVE_GC</span></code></a> set. For such objects,
215
-
use <aclass="reference internal" href="gcsupport.html#c.PyObject_GC_NewVar" title="PyObject_GC_NewVar"><codeclass="xref c c-func docutils literal notranslate"><spanclass="pre">PyObject_GC_NewVar()</span></code></a> instead.</p>
<dd><emclass="stableabi"> 為 <aclass="reference internal" href="stable.html#stable"><spanclass="std std-ref">穩定 ABI 的一部分</span></a>.</em><p>This instance of <aclass="reference internal" href="type.html#c.PyTypeObject" title="PyTypeObject"><codeclass="xref c c-type docutils literal notranslate"><spanclass="pre">PyTypeObject</span></code></a> represents the Python boolean type; it
183
-
is the same object as <aclass="reference internal" href="../library/functions.html#bool" title="bool"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">bool</span></code></a> in the Python layer.</p>
0 commit comments