Results of 1 - 10 of about 46 for alloc (0.011 sec.)
- Allocating objects on the heap — Python 3.14.8 ドキュメント 13593
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » オブジェクト実装サポート (object implementation support) » Allocating objects on the heap テーマ 自動 ライト ダーク | Allocating
...* PyObject_Init ( PyObject * op , PyTypeObject * type ) ¶ 戻り値: 借用参照。 次に属します: Stable ABI . Initialize a newly allocated object op with its type and initial reference. Returns the initialized object. Other fields of the object are not init...unction does not call the object's __init__() method. In general, consider this function to be a low-level routine. Use tp_alloc where possible. For implementing tp_alloc for your type, prefer PyType_GenericAlloc() or PyObject_New() . 注釈 This functi...釈 This function only initializes some of the object's memory. It does not zero the rest. PyObject_New ( TYPE , typeobj ) ¶ Allocates a new Python object using the C structure type TYPE and the Python type object typeobj ( PyTypeObject* ) by calling Py... - https://man.mtool.work/python/3.14/c-api/allocation.html
- Allocating objects on the heap — Python 3.14.8 ドキュメント 13593
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » オブジェクト実装サポート (object implementation support) » Allocating objects on the heap テーマ 自動 ライト ダーク | Allocating
...* PyObject_Init ( PyObject * op , PyTypeObject * type ) ¶ 戻り値: 借用参照。 次に属します: Stable ABI . Initialize a newly allocated object op with its type and initial reference. Returns the initialized object. Other fields of the object are not init...unction does not call the object's __init__() method. In general, consider this function to be a low-level routine. Use tp_alloc where possible. For implementing tp_alloc for your type, prefer PyType_GenericAlloc() or PyObject_New() . 注釈 This functi...釈 This function only initializes some of the object's memory. It does not zero the rest. PyObject_New ( TYPE , typeobj ) ¶ Allocates a new Python object using the C structure type TYPE and the Python type object typeobj ( PyTypeObject* ) by calling Py... - https://man.mtool.work/python/3.14/c-api/allocation.html
- 循環参照ガベージコレクションをサポートする — Python 3.14.8 ドキュメント 9779
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » オブジェクト実装サポート (object implementation support) » 循環参照ガベージコレクションをサポートする テーマ 自動 ライト ダーク |
...ェクトと呼びます。 コンテナ型のコンストラクタは以下の二つの規則に適合しなければなりません: The memory for the object must be allocated using PyObject_GC_New or PyObject_GC_NewVar . 他のコンテナへの参照が入るかもしれないフィールドが全て初期化されたら、す...) ¶ Analogous to PyObject_New but for container objects with the Py_TPFLAGS_HAVE_GC flag set. Do not call this directly to allocate memory for an object; call the type's tp_alloc slot instead. When populating a type's tp_alloc slot, PyType_GenericAllo...c() is preferred over a custom function that simply calls this macro. Memory allocated by this macro must be freed with PyObject_GC_Del() (usually called via the object's tp_free slot). 参考 PyObject_GC_De... - https://man.mtool.work/python/3.14/c-api/gcsupport.html
- 循環参照ガベージコレクションをサポートする — Python 3.14.8 ドキュメント 9306
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » オブジェクト実装サポート (object implementation support) » 循環参照ガベージコレクションをサポートする テーマ 自動 ライト ダーク |
...ェクトと呼びます。 コンテナ型のコンストラクタは以下の二つの規則に適合しなければなりません: The memory for the object must be allocated using PyObject_GC_New or PyObject_GC_NewVar . 他のコンテナへの参照が入るかもしれないフィールドが全て初期化されたら、す...) ¶ Analogous to PyObject_New but for container objects with the Py_TPFLAGS_HAVE_GC flag set. Do not call this directly to allocate memory for an object; call the type's tp_alloc slot instead. When populating a type's tp_alloc slot, PyType_GenericAllo...c() is preferred over a custom function that simply calls this macro. Memory allocated by this macro must be freed with PyObject_GC_Del() (usually called via the object's tp_free slot). 参考 PyObject_GC_De... - https://man.mtool.work/python/3.14/c-api/gcsupport.html
- 2. 拡張の型の定義: チュートリアル — Python 3.14.8 ドキュメント 9199
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 2. 拡張の型の定義: チュートリアル テーマ 自動 ライト ダーク | 2. 拡張の型の定義: チュートリアル ¶ Python では、組み込みの s
...D PyObject * first ; /* first name */ PyObject * last ; /* last name */ int number ; } CustomObject ; static void Custom_dealloc ( PyObject * op ) { CustomObject * self = ( CustomObject * ) op ; Py_XDECREF ( self -> first ); Py_XDECREF ( self -> last...w ( PyTypeObject * type , PyObject * args , PyObject * kwds ) { CustomObject * self ; self = ( CustomObject * ) type -> tp_alloc ( type , 0 ); if ( self != NULL ) { self -> first = Py_GetConstant ( Py_CONSTANT_EMPTY_STR ); if ( self -> first == NULL )...ize = 0 , . tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE , . tp_new = Custom_new , . tp_init = Custom_init , . tp_dealloc = Custom_dealloc , . tp_members = Custom_members , . tp_methods = Custom_methods , }; static int custom_module_exec ( PyOb... - https://man.mtool.work/python/3.14/extending/newtypes_tutorial.html
- 2. 拡張の型の定義: チュートリアル — Python 3.14.8 ドキュメント 9199
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 2. 拡張の型の定義: チュートリアル テーマ 自動 ライト ダーク | 2. 拡張の型の定義: チュートリアル ¶ Python では、組み込みの s
...D PyObject * first ; /* first name */ PyObject * last ; /* last name */ int number ; } CustomObject ; static void Custom_dealloc ( PyObject * op ) { CustomObject * self = ( CustomObject * ) op ; Py_XDECREF ( self -> first ); Py_XDECREF ( self -> last...w ( PyTypeObject * type , PyObject * args , PyObject * kwds ) { CustomObject * self ; self = ( CustomObject * ) type -> tp_alloc ( type , 0 ); if ( self != NULL ) { self -> first = Py_GetConstant ( Py_CONSTANT_EMPTY_STR ); if ( self -> first == NULL )...ize = 0 , . tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE , . tp_new = Custom_new , . tp_init = Custom_init , . tp_dealloc = Custom_dealloc , . tp_members = Custom_members , . tp_methods = Custom_methods , }; static int custom_module_exec ( PyOb... - https://man.mtool.work/python/3.14/extending/newtypes_tutorial.html
- Object Life Cycle — Python 3.14.8 ドキュメント 8726
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » オブジェクト実装サポート (object implementation support) » Object Life Cycle テーマ 自動 ライト ダーク | Object Life Cycle ¶ This
...l indicating the condition that must be true for B to occur after A . Life Events tp_new tp_new start->tp_new type call tp_alloc tp_alloc tp_new->tp_alloc direct call tp_init tp_init tp_new->tp_init reachable reachable tp_init->reachable reachable->tp...e remove finalized mark) uncollectable uncollectable (leaked) reachable->uncollectable cyclic isolate (no GC support) tp_dealloc tp_dealloc reachable->tp_dealloc no refs tp_traverse->finalized? cyclic isolate finalized?->tp_finalize no (mark as finali...zed) tp_clear tp_clear finalized?->tp_clear yes tp_finalize->tp_clear no refs or cyclic isolate tp_finalize->tp_dealloc recommended call (see explanation) tp_finalize->tp_dealloc no refs tp_clear->uncollectable cyclic isolate tp_clear->tp_dea... - https://man.mtool.work/python/3.14/c-api/lifecycle.html
- Object Life Cycle — Python 3.14.8 ドキュメント 8726
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » オブジェクト実装サポート (object implementation support) » Object Life Cycle テーマ 自動 ライト ダーク | Object Life Cycle ¶ This
...l indicating the condition that must be true for B to occur after A . Life Events tp_new tp_new start->tp_new type call tp_alloc tp_alloc tp_new->tp_alloc direct call tp_init tp_init tp_new->tp_init reachable reachable tp_init->reachable reachable->tp...e remove finalized mark) uncollectable uncollectable (leaked) reachable->uncollectable cyclic isolate (no GC support) tp_dealloc tp_dealloc reachable->tp_dealloc no refs tp_traverse->finalized? cyclic isolate finalized?->tp_finalize no (mark as finali...zed) tp_clear tp_clear finalized?->tp_clear yes tp_finalize->tp_clear no refs or cyclic isolate tp_finalize->tp_dealloc recommended call (see explanation) tp_finalize->tp_dealloc no refs tp_clear->uncollectable cyclic isolate tp_clear->tp_dea... - https://man.mtool.work/python/3.14/c-api/lifecycle.html
- Type Object Structures — Python 3.14.8 ドキュメント 8268
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » オブジェクト実装サポート (object implementation support) » Type Object Structures テーマ 自動 ライト ダーク | Type Object Structu
...属性 Info [ 2 ] O T D I <R> tp_name const char * __name__ X X tp_basicsize Py_ssize_t X X X tp_itemsize Py_ssize_t X X tp_dealloc destructor X X X tp_vectorcall_offset Py_ssize_t X X ( tp_getattr ) getattrfunc __getattribute__, __getattr__ G ( tp_setat...et__ X tp_descr_set descrsetfunc __set__, __delete__ X ( tp_dictoffset ) Py_ssize_t X ? tp_init initproc __init__ X X X tp_alloc allocfunc X ? ? tp_new newfunc __new__ X X ? ? tp_free freefunc X X ? ? tp_is_gc inquiry X X < tp_bases > PyObject * __bas...er__ bf_releasebuffer releasebufferproc() __release_buffer__ スロットの定義型 (typedef) ¶ 定義型 (typedef) 引数型 返り値型 allocfunc PyTypeObject * Py_ssize_t PyObject * destructor PyObject * void freefunc void * void traverseproc PyObject * visitproc... - https://man.mtool.work/python/3.14/c-api/typeobj.html
- Type Object Structures — Python 3.14.8 ドキュメント 8268
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » オブジェクト実装サポート (object implementation support) » Type Object Structures テーマ 自動 ライト ダーク | Type Object Structu
...属性 Info [ 2 ] O T D I <R> tp_name const char * __name__ X X tp_basicsize Py_ssize_t X X X tp_itemsize Py_ssize_t X X tp_dealloc destructor X X X tp_vectorcall_offset Py_ssize_t X X ( tp_getattr ) getattrfunc __getattribute__, __getattr__ G ( tp_setat...et__ X tp_descr_set descrsetfunc __set__, __delete__ X ( tp_dictoffset ) Py_ssize_t X ? tp_init initproc __init__ X X X tp_alloc allocfunc X ? ? tp_new newfunc __new__ X X ? ? tp_free freefunc X X ? ? tp_is_gc inquiry X X < tp_bases > PyObject * __bas...er__ bf_releasebuffer releasebufferproc() __release_buffer__ スロットの定義型 (typedef) ¶ 定義型 (typedef) 引数型 返り値型 allocfunc PyTypeObject * Py_ssize_t PyObject * destructor PyObject * void freefunc void * void traverseproc PyObject * visitproc... - https://man.mtool.work/python/3.14/c-api/typeobj.html