Results of 1 - 2 of about 2 for newdatatype (0.002 sec.)
- 3. 拡張の型の定義: 雑多なトピック — Python 3.14.8 ドキュメント 11228
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 3. 拡張の型の定義: 雑多なトピック テーマ 自動 ライト ダーク | 3. 拡張の型の定義: 雑多なトピック ¶ この節ではさまざまな実装可
...ここに入れられます。オブジェクトそれ自体もここで解放される必要があります。この関数の例は、以下のようなものです: static void newdatatype_dealloc ( PyObject * op ) { newdatatypeobject * self = ( newdatatypeobject * ) op ; free ( self -> obj_UnderlyingDatatypeP...pports garbage collection, the destructor should call PyObject_GC_UnTrack() before clearing any member fields: static void newdatatype_dealloc ( PyObject * op ) { newdatatypeobject * self = ( newdatatypeobject * ) op ; PyObject_GC_UnTrack ( op ); Py_CLEAR (...インスタンスの文字列表現を格納した文字列オブジェクトを返す必要があります。簡単な例は以下のようなものです: static PyObject * newdatatype_repr ( PyObject * op ) { newdatatypeobject * self = ( newdatatypeobject * ) op ; return PyUnicode_FromFormat ( "Repr-ified... - https://man.mtool.work/python/3.14/extending/newtypes.html
- 3. 拡張の型の定義: 雑多なトピック — Python 3.14.8 ドキュメント 7485
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 3. 拡張の型の定義: 雑多なトピック テーマ 自動 ライト ダーク | 3. 拡張の型の定義: 雑多なトピック ¶ この節ではさまざまな実装可
...ここに入れられます。オブジェクトそれ自体もここで解放される必要があります。この関数の例は、以下のようなものです: static void newdatatype_dealloc ( PyObject * op ) { newdatatypeobject * self = ( newdatatypeobject * ) op ; free ( self -> obj_UnderlyingDatatypeP...pports garbage collection, the destructor should call PyObject_GC_UnTrack() before clearing any member fields: static void newdatatype_dealloc ( PyObject * op ) { newdatatypeobject * self = ( newdatatypeobject * ) op ; PyObject_GC_UnTrack ( op ); Py_CLEAR (...インスタンスの文字列表現を格納した文字列オブジェクトを返す必要があります。簡単な例は以下のようなものです: static PyObject * newdatatype_repr ( PyObject * op ) { newdatatypeobject * self = ( newdatatypeobject * ) op ; return PyUnicode_FromFormat ( "Repr-ified... - https://man.mtool.work/python/3.14/extending/newtypes.html
PREV
1
NEXT