Results of 1 - 10 of about 25 for pointer (0.006 sec.)
- ctypes --- Python 用の外部関数ライブラリ 15608
- ctypes --- Python 用の外部関数ライブラリ ソースコード: Lib/ctypes ctypes は Python 用の外部関数ライブラリです。 C と互換性のあるデータ型を提供し、DLL や共有ライブラリの関数を呼び出せます。 これらのライブラリを純粋な Python でラップするために
...があります。 >>> libc . time . restype = c_time_t 引数の型は argtypes を使って指定できます。 >>> libc . time . argtypes = ( POINTER ( c_time_t ),) 第 1 引数に NULL ポインタを渡して関数を呼び出すには、 None を使います。 >>> print ( libc . time ( None )) 1...>>> strchr = libc . strchr >>> strchr ( b "abcdef" , ord ( "d" )) 8059983 >>> strchr . restype = c_char_p # c_char_p is a pointer to a string >>> strchr ( b "abcdef" , ord ( "d" )) b'def' >>> print ( strchr ( b "abcdef" , ord ( "x" ))) None >>> 上の例の...これは パラメータの参照渡し としても知られています。 ctypes は、引数を参照渡しするための byref() 関数をエクスポートします。 pointer() 関数でも同じ効果を得られますが、 pointer() は実際のポインタオブジェクトを構築するため、より多くの処理を行います。 Python... - https://man.mtool.work/python/3.14/library/ctypes.html
- カプセル 10793
- カプセル これらのオブジェクトの使い方については 拡張モジュールに C API を提供する を参照してください。 Added in version 3.1. type PyCapsule PyObject のこのサブタイプは不透明な値を表します。 C 拡張モジュールから Python のコードを経由して別の
...hread safety: Atomic . 引数が PyCapsule の場合に真を返します。この関数は常に成功します。 PyObject * PyCapsule_New ( void * pointer , const char * name , PyCapsule_Destructor destructor ) 戻り値: 新しい参照。 次に属します: Stable ABI . Thread safety: Ato...mic . pointer を格納する PyCapsule を作成します。 pointer 引数は NULL であってはなりません。 失敗した場合、例外を設定して NULL を返します...べきです。こうすると、他のモジュールがそのカプセルを PyCapsule_Import() でインポートすることができます。 void * PyCapsule_GetPointer ( PyObject * capsule , const char * name ) 次に属します: Stable ABI . Thread safety: Safe to call without external synchro... - https://man.mtool.work/python/3.14/c-api/capsule.html
- Python support for the Linux perf profiler 9249
- Python support for the Linux perf profiler author : Pablo Galindo The Linux perf profiler is a very powerful tool that allows you to profile and obtain information about the performance of your application. perf also has a very vibrant ecos
...perf report -g -i perf.data 最良の結果を得る方法 For best results, Python should be compiled with CFLAGS="-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" as this allows profilers to unwind using only the frame pointer and not on DWARF debug infor...able. このフラグを使ってコンパイルされたかどうかは、次を実行して確認できます。 $ python -m sysconfig | grep 'no-omit-frame-pointer' 何も表示されなければ、インタープリタはフレームポインタなしでコンパイルされています。 その場合、 perf の出力に Python 関数...ります。 通常、最適化 ( -O1 、 -O2 など) を有効にするとスタックのサイズが小さくなります。 フレームポインタ ( -fno-omit-frame-pointer ) を使うと、一般にスタックをより確実にたどれます。 他のマニュアルの関連ページ Linux JM script(1) Linux JM sigreturn(2) Lin... - https://man.mtool.work/python/3.14/howto/perf_profiling.html
- バッファプロトコル (buffer Protocol) 8701
- バッファプロトコル (buffer Protocol) Pythonで利用可能ないくつかのオブジェクトは、下層にあるメモリ配列または buffer へのアクセスを提供します。このようなオブジェクトとして、組み込みの bytes や bytearray 、 array.array のようないくつかの拡張型
...も NULL でない場合の、N 次元インデックスによって指されている N 次元配列内の要素へのポインタを返す関数です: void * get_item_pointer ( int ndim , void * buf , Py_ssize_t * strides , Py_ssize_t * suboffsets , Py_ssize_t * indices ) { char * pointer = ( cha...r * ) buf ; int i ; for ( i = 0 ; i < ndim ; i ++ ) { pointer += strides [ i ] * indices [ i ]; if ( suboffsets [ i ] >= 0 ) { pointer = * (( char ** ) pointer ) + suboffsets [ i ]; }...} return ( void * ) pointer ; } バッファ関連の関数 int PyObject_CheckBuffer ( PyObject * obj ) 次に属します: Stable ABI (バージョン 3.11 より). obj が... - https://man.mtool.work/python/3.14/c-api/buffer.html
- Expat C API 8518
- Expat C API The xml.parsers.expat module exposes selected Expat functions through its expat_CAPI capsule. This allows extension modules to use the same Expat library as Python. The interface is declared in pyexpat.h , which must be included
...AME The name of the capsule containing the Expat C API: "pyexpat.expat_CAPI" . Pass this to PyCapsule_Import() to obtain a pointer to a PyExpat_CAPI . PyExpat_CAPI_MAGIC The string identifying the layout of PyExpat_CAPI . Before using the function point...ring using strcmp() and its size member is at least sizeof ( struct PyExpat_CAPI ) . struct PyExpat_CAPI Table of function pointers exported by xml.parsers.expat . The capsule owns this structure: treat it as read-only and do not free it. Keep a strong...sule while using the table. Check the compatibility fields as described under PyExpat_CAPI_MAGIC before using the function pointers. char * magic Interface identifier, set to PyExpat_CAPI_MAGIC . int size Size of the structure in bytes, set to sizeof(st... - https://man.mtool.work/python/3.14/c-api/pyexpat.html
- リモートデバッグのアタッチプロトコル 8236
- リモートデバッグのアタッチプロトコル このプロトコルを使うと、外部ツールから実行中の CPython プロセスにアタッチし、Python コードをリモートで実行できます。 別の Python プロセスへのアタッチには、プラットフォームによって追加の権限や設定が必要な
...s involves reading and interpreting the ELF file format structures from the binary file on disk. The ELF header contains a pointer to the section header table. Each section header contains metadata about a section including its name (stored in a separat...s_head を読む interp_head_ptr = ( py_runtime_addr + debug_offsets . runtime_state . interpreters_head ) interp_addr = read_pointer ( pid , interp_head_ptr ) if interp_addr == 0 : raise RuntimeError ( "No interpreter found in the target process" ) # 手順...ンターを読む threads_main_ptr = ( interp_addr + debug_offsets . interpreter_state . threads_main ) thread_state_addr = read_pointer ( pid , threads_main_ptr ) if thread_state_addr == 0 : raise RuntimeError ( "Main thread state is not available" ) return... - https://man.mtool.work/python/3.14/howto/remote_debugging.html
- 弱参照オブジェクト 8153
- 弱参照オブジェクト Python は 弱参照 を第一級オブジェクト (first-class object) としてサポートします。弱参照を直接実装する二種類の固有のオブジェクト型があります。第一は単純な参照オブジェクトで、第二はオリジナルのオブジェクトに対して可能な限り
...べてのコールバックの呼び出しを試みた後で戻ります。 PyObject * * PyObject_GET_WEAKREFS_LISTPTR ( PyObject * object ) Return a pointer to an internal linked list of weak references to object . object must support weak references and must not be NULL . This...function is intended for internal use only. Do not access or modify the weak reference list through the returned pointer. バージョン 3.14.10 で ソフト非推奨 <Soft deprecated> . void PyUnstable_Object_ClearWeakRefsNoCallbacks ( PyObject * objec... - https://man.mtool.work/python/3.14/c-api/weakref.html
- 1. Extending Python with C or C++ 8153
- 1. Extending Python with C or C++ It is quite easy to add new built-in modules to Python, if you know how to program in C. Such extension modules can do two things that can't be done directly in Python: they can implement new built-in objec
...module object for module-level functions; for a method it would point to the object instance. The args argument will be a pointer to a Python tuple object containing the arguments. Each item of the tuple corresponds to an argument in the call's argumen...the following: when a function fails, it should set an exception condition and return an error value (usually -1 or a NULL pointer). Exception information is stored in three members of the interpreter's thread state. These are NULL if there is no except...g_ParseTuple ( args , "s" , & command )) return NULL ; It returns NULL (the error indicator for functions returning object pointers) if an error is detected in the argument list, relying on the exception set by PyArg_ParseTuple() . Otherwise the string... - https://man.mtool.work/python/3.14/extending/extending.html
- 監査イベント表 8053
- 監査イベント表 この表は、 CPython ランタイムと標準ライブラリ全体で sys.audit() または PySys_Audit() の呼び出しによって送出されるすべてのイベントを含んでいます。これらの呼び出しは、 3.8 以降に追加されました ( PEP 578 を参照) 。 これらのイベン
...name [1] cpython.run_startup filename [1] cpython.run_stdin [1] [2] [3] ctypes.addressof obj [1] ctypes.call_function func_pointer , arguments [1] ctypes.cdata address [1] ctypes.cdata/buffer pointer , size , offset [1] [2] ctypes.create_string_buffer i... - https://man.mtool.work/python/3.14/library/audit_events.html
- ipaddress --- IPv4/IPv6 操作ライブラリ 7970
- ipaddress --- IPv4/IPv6 操作ライブラリ ソースコード: Lib/ipaddress.py ipaddress は IPv4 と IPv6 のアドレスやネットワークを作成、操作する機能を提供します。 このモジュールの関数やクラスを使うと、IPアドレスに関する様々なタスク、例えば2つのホス
...ナリ表現 - 適切な長さをもった bytes オブジェクト(最上位オクテットが先頭)。 IPv4 では 4 byte で、 IPv6 では 16 byte。 reverse_pointer IP アドレスの逆引き DNS PTR レコードの名前です。 例えば次のようになります。 >>> ipaddress . ip_address ( "127.0.0.1" ) . r...everse_pointer '1.0.0.127.in-addr.arpa' >>> ipaddress . ip_address ( "2001:db8::1" ) . reverse_pointer '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0...も省略されない。 以降の属性とメソッドについては、 IPv4Address クラスの対応するドキュメントを参照してください: packed reverse_pointer version max_prefixlen is_multicast is_private is_global Added in version 3.4. is_unspecified is_reserved is_loopback is_li... - https://man.mtool.work/python/3.14/library/ipaddress.html