per page, with , order by , clip by
Results of 1 - 10 of about 24 for FromLong (0.007 sec.)
1. Extending Python with C or C++ — Python 3.14.8 ドキュメント 12126
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 1. Extending Python with C or C++ テーマ 自動 ライト ダーク | 1. Extending Python with C or C++ ¶ It is quite easy to add n ... mand ; int sts ; if ( ! PyArg_ParseTuple ( args , "s" , & command )) return NULL ; sts = system ( command ); return PyLong_FromLong ( sts ); } There is a straightforward translation from the argument list in Python (for example, the single expression "ls ... コードは、 PyErr_NoMemory() を呼び出して、失敗を示す値を返さねばなりません。オブジェクトを生成する全ての関数 (例えば PyLong_FromLong() ) は PyErr_NoMemory() の呼び出しを済ませてしまうので、この規則が関係するのは直接 malloc() を呼び出すコードだけです。 また ... ystem ( command ); if ( sts < 0 ) { PyErr_SetString ( SpamError , "System command failed" ); return NULL ; } return PyLong_FromLong ( sts ); } 1.3. Back to the Example ¶ Going back to our example function, you should now be able to understand this statem ...
https://man.mtool.work/python/3.14/extending/extending.html
1. Extending Python with C or C++ — Python 3.14.8 ドキュメント 12126
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 1. Extending Python with C or C++ テーマ 自動 ライト ダーク | 1. Extending Python with C or C++ ¶ It is quite easy to add n ... mand ; int sts ; if ( ! PyArg_ParseTuple ( args , "s" , & command )) return NULL ; sts = system ( command ); return PyLong_FromLong ( sts ); } There is a straightforward translation from the argument list in Python (for example, the single expression "ls ... コードは、 PyErr_NoMemory() を呼び出して、失敗を示す値を返さねばなりません。オブジェクトを生成する全ての関数 (例えば PyLong_FromLong() ) は PyErr_NoMemory() の呼び出しを済ませてしまうので、この規則が関係するのは直接 malloc() を呼び出すコードだけです。 また ... ystem ( command ); if ( sts < 0 ) { PyErr_SetString ( SpamError , "System command failed" ); return NULL ; } return PyLong_FromLong ( sts ); } 1.3. Back to the Example ¶ Going back to our example function, you should now be able to understand this statem ...
https://man.mtool.work/python/3.14/extending/extending.html
Boolean オブジェクト — Python 3.14.8 ドキュメント 11476
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 具象オブジェクト (concrete object) レイヤ » Boolean オブジェクト テーマ 自動 ライト ダーク | Boolean オブジェクト ¶ Python の Boo ... l です。 Py_RETURN_FALSE ¶ 関数から Py_False を返します。 Py_RETURN_TRUE ¶ 関数から Py_True を返します。 PyObject * PyBool_FromLong ( long v ) ¶ 戻り値: 新しい参照。 次に属します: Stable ABI . v の真理値に応じて Py_True または Py_False を返します。 関連キ ... ortal ブール PyTypeObject Type Stable Boolean 整数 サブクラス 実装 通常 マクロ インスタンス boolean 表現 レイヤ Check 成功 FromLong long 真理値 前のトピックへ 整数型オブジェクト (integer object) 次のトピックへ Floating-Point Objects This page Report a bu ...
https://man.mtool.work/python/3.14/c-api/bool.html
はじめに — Python 3.14.8 ドキュメント 9841
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » はじめに テーマ 自動 ライト ダーク | はじめに ¶ Python のアプリケーションプログラマ用インタフェース (Application Programmer's Int ... とは忘れておきます; もっとよい書き方を後で示します): PyObject * t ; t = PyTuple_New ( 3 ); PyTuple_SetItem ( t , 0 , PyLong_FromLong ( 1L )); PyTuple_SetItem ( t , 1 , PyLong_FromLong ( 2L )); PyTuple_SetItem ( t , 2 , PyUnicode_FromString ( "three" )); こ ... こで、 PyLong_FromLong() は新しい参照を返し、すぐに PyTuple_SetItem() に盗まれます。参照が盗まれた後もそのオブジェクトを利用したい場合は、参照盗む ... PyErr_ExceptionMatches ( PyExc_KeyError )) goto error ; /* Clear the error and use zero: */ PyErr_Clear (); item = PyLong_FromLong ( 0L ); if ( item == NULL ) goto error ; } const_one = PyLong_FromLong ( 1L ); if ( const_one == NULL ) goto error ; incre ...
https://man.mtool.work/python/3.14/c-api/intro.html
はじめに — Python 3.14.8 ドキュメント 9841
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » はじめに テーマ 自動 ライト ダーク | はじめに ¶ Python のアプリケーションプログラマ用インタフェース (Application Programmer's Int ... とは忘れておきます; もっとよい書き方を後で示します): PyObject * t ; t = PyTuple_New ( 3 ); PyTuple_SetItem ( t , 0 , PyLong_FromLong ( 1L )); PyTuple_SetItem ( t , 1 , PyLong_FromLong ( 2L )); PyTuple_SetItem ( t , 2 , PyUnicode_FromString ( "three" )); こ ... こで、 PyLong_FromLong() は新しい参照を返し、すぐに PyTuple_SetItem() に盗まれます。参照が盗まれた後もそのオブジェクトを利用したい場合は、参照盗む ... PyErr_ExceptionMatches ( PyExc_KeyError )) goto error ; /* Clear the error and use zero: */ PyErr_Clear (); item = PyLong_FromLong ( 0L ); if ( item == NULL ) goto error ; } const_one = PyLong_FromLong ( 1L ); if ( const_one == NULL ) goto error ; incre ...
https://man.mtool.work/python/3.14/c-api/intro.html
モジュールオブジェクト (module object) — Python 3.14.8 ドキュメント 9174
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 具象オブジェクト (concrete object) レイヤ » モジュールオブジェクト (module object) テーマ 自動 ライト ダーク | モジュールオブジェ ... なると例外を送出して -1 を返します。 使用例: static int add_spam ( PyObject * module , int value ) { PyObject * obj = PyLong_FromLong ( value ); if ( obj == NULL ) { return -1 ; } int res = PyModule_AddObjectRef ( module , "spam" , obj ); Py_DECREF ( obj ) ... であることを確認せずに書くこともできます: static int add_spam ( PyObject * module , int value ) { PyObject * obj = PyLong_FromLong ( value ); int res = PyModule_AddObjectRef ( module , "spam" , obj ); Py_XDECREF ( obj ); return res ; } この場合は、 obj ... ization function. Return -1 with an exception set on error, 0 on success. This is a convenience function that calls PyLong_FromLong() and PyModule_AddObjectRef() ; see their documentation for details. int PyModule_AddStringConstant ( PyObject * module , ...
https://man.mtool.work/python/3.14/c-api/module.html
モジュールオブジェクト (module object) — Python 3.14.8 ドキュメント 9174
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 具象オブジェクト (concrete object) レイヤ » モジュールオブジェクト (module object) テーマ 自動 ライト ダーク | モジュールオブジェ ... なると例外を送出して -1 を返します。 使用例: static int add_spam ( PyObject * module , int value ) { PyObject * obj = PyLong_FromLong ( value ); if ( obj == NULL ) { return -1 ; } int res = PyModule_AddObjectRef ( module , "spam" , obj ); Py_DECREF ( obj ) ... であることを確認せずに書くこともできます: static int add_spam ( PyObject * module , int value ) { PyObject * obj = PyLong_FromLong ( value ); int res = PyModule_AddObjectRef ( module , "spam" , obj ); Py_XDECREF ( obj ); return res ; } この場合は、 obj ... ization function. Return -1 with an exception set on error, 0 on success. This is a convenience function that calls PyLong_FromLong() and PyModule_AddObjectRef() ; see their documentation for details. int PyModule_AddStringConstant ( PyObject * module , ...
https://man.mtool.work/python/3.14/c-api/module.html
Boolean オブジェクト — Python 3.14.8 ドキュメント 8857
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 具象オブジェクト (concrete object) レイヤ » Boolean オブジェクト テーマ 自動 ライト ダーク | Boolean オブジェクト ¶ Python の Boo ... l です。 Py_RETURN_FALSE ¶ 関数から Py_False を返します。 Py_RETURN_TRUE ¶ 関数から Py_True を返します。 PyObject * PyBool_FromLong ( long v ) ¶ 戻り値: 新しい参照。 次に属します: Stable ABI . v の真理値に応じて Py_True または Py_False を返します。 関連キ ...
https://man.mtool.work/python/3.14/c-api/bool.html
C API Stability — Python 3.14.8 ドキュメント 8190
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » C API Stability テーマ 自動 ライト ダーク | C API Stability ¶ Unless documented otherwise, Python's C API is covered by the Backw ... F_RECORDS_RO PyBUF_SIMPLE PyBUF_STRIDED PyBUF_STRIDED_RO PyBUF_STRIDES PyBUF_WRITABLE PyBUF_WRITE PyBaseObject_Type PyBool_FromLong() PyBool_Type PyBuffer_FillContiguousStrides() PyBuffer_FillInfo() PyBuffer_FromContiguous() PyBuffer_GetPointer() PyBuffe ... LongMask() PyLong_AsUnsignedLongMask() PyLong_AsVoidPtr() PyLong_FromDouble() PyLong_FromInt32() PyLong_FromInt64() PyLong_FromLong() PyLong_FromLongLong() PyLong_FromNativeBytes() PyLong_FromSize_t() PyLong_FromSsize_t() PyLong_FromString() PyLong_FromU ...
https://man.mtool.work/python/3.14/c-api/stable.html
1. 他のアプリケーションへの Python の埋め込み — Python 3.14.8 ドキュメント 8190
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python インタプリタの拡張と埋め込み » 1. 他のアプリケーションへの Python の埋め込み テーマ 自動 ライト ダーク | 1. 他のアプリケーションへの Python の埋め込み ¶ 前 ... c && PyCallable_Check ( pFunc )) { pArgs = PyTuple_New ( argc - 3 ); for ( i = 0 ; i < argc - 3 ; ++ i ) { pValue = PyLong_FromLong ( atoi ( argv [ i + 3 ])); if ( ! pValue ) { Py_DECREF ( pArgs ); Py_DECREF ( pModule ); fprintf ( stderr , "Cannot conver ... numargs ( PyObject * self , PyObject * args ) { if ( ! PyArg_ParseTuple ( args , ":numargs" )) return NULL ; return PyLong_FromLong ( numargs ); } static PyMethodDef emb_module_methods [] = { { "numargs" , emb_numargs , METH_VARARGS , "Return the number ...
https://man.mtool.work/python/3.14/extending/embedding.html
PREV 1 2 3 NEXT