Results of 1 - 4 of about 4 for typedef (0.001 sec.)
- FFI の基本的な使い方 | PHP 8.3 12149
- FFI の基本的な使い方 FFI API の詳細に深く立ち入る前に、よくあるタスクに対する FFI API の使い方が どれほど簡単かを示す例をいくつか見てみましょう。 注意 : これらの例の中には、 libc.so.6 を必要とするものがあります。 それらは、このライブラリが利
... さい。 例2 関数を呼び出し、構造体を引数経由で返す <?php // gettimeofday() のバインディングを作成する $ffi = FFI :: cdef ( " typedef unsigned int time_t; typedef unsigned int suseconds_t; struct timeval { time_t tv_sec; suseconds_t tv_usec; }; struct time ... ; ?> 上の例の出力は以下となります。 int(25) int(523776) int(1024) int(8192) 例6 C の enum を扱う <?php $a = FFI :: cdef ( 'typedef enum _zend_ffi_symbol_kind { ZEND_FFI_SYM_TYPE, ZEND_FFI_SYM_CONST = 2, ZEND_FFI_SYM_VAR, ZEND_FFI_SYM_FUNC } zend_ffi_sym ...
-
https://man.mtool.work/php/8.3/ffi.examples-basic.html
- PHP のコールバック | PHP 8.3 9153
- PHP のコールバック PHP のクロージャを、関数ポインタ型のネイティブ変数に代入したり、 関数の引数として渡したりできます。 例1 PHP の Closure を C の関数ポインタに代入する <?php $zend = FFI :: cdef ( " typedef int (*zend_write_func_t)(const cha
...
-
https://man.mtool.work/php/8.3/ffi.examples-callback.html
- The Yar Protocol | PHP 8.3 8562
- The Yar Protocol Yar does not rely on a schema or IDL file: everything is exchanged on the wire as plain bytes. Any language that can read and write bytes can speak to a Yar service, without installing any framework at all — build one fixed
... like the following C structure, packed with no padding, and is written to the wire field after field in declaration order: typedef struct _yar_header { uint32_t id; /* transaction id */ uint16_t version; /* protocol version, currently always 0 */ uint32 ...
-
https://man.mtool.work/php/8.3/yar.protocol.html
- MySQL Native Driverプラグイン のアーキテクチャ | PHP 8.3 7064
- MySQL Native Driverプラグイン のアーキテクチャ このセクションでは、 mysqlnd プラグイン のアーキテクチャについての概要を示します。 MySQL Native Driver の概要 mysqlnd プラグイン を開発する前に、 mysqlnd そのものがどのように成り立っているのかを
... ことを必ず頭にいれておいてください! 次のコードはプロパティを拡張する方法を示しています: /* any data we want to associate */ typedef struct my_conn_properties { unsigned long query_counter; } MY_CONN_PROPERTIES; /* plugin id */ unsigned int my_plugin_id; ...
-
https://man.mtool.work/php/8.3/mysqlnd.plugin.architecture.html
PREV
1
NEXT