Home
last modified time | relevance | path

Searched refs:ffi (Results 1 – 25 of 121) sorted by relevance

12345

/php-src/ext/ffi/tests/
H A Dgh14286_1.phpt2 GH-14286 (ffi enum type (when enum has no name) make memory leak)
4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef("
33 var_dump($ffi->TEST_ONE);
34 var_dump($ffi->TEST_TWO);
35 var_dump($ffi->TEST_THREE);
36 var_dump($ffi->TEST_FOUR);
37 var_dump($ffi->TEST_FIVE);
38 var_dump($ffi->TEST_SIX);
H A Dweak_reference_004.phpt4 ffi
6 ffi.enable=1
11 $ffi = \FFI::cdef('');
12 $cdata_value = $ffi->new('int');
13 $cdata_array = $ffi->new('int[1]');
14 $cdata_free = $ffi->new('int[1]', false);
16 $ctype = $ffi->type('int');
18 $map[$ffi] = 'ffi';
26 unset($ffi);
H A D044.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef("
21 var_dump(FFI::sizeof($ffi->new("a")));
22 var_dump(FFI::sizeof($ffi->new("ua")));
23 var_dump(FFI::sizeof($ffi->new("b")));
24 var_dump(FFI::sizeof($ffi->new("ub")));
25 var_dump(FFI::sizeof($ffi->new("c")));
27 var_dump(FFI::sizeof($ffi->new("d")));
29 var_dump(FFI::sizeof($ffi->new("e")));
[all …]
H A D036.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef();
11 $type = $ffi->type("int*");
15 global $ffi;
16 //$buf = $ffi->new("int*[1]"); /* this loses type and crash */
17 $buf = $ffi->new(FFI::arrayType($type, [1]));
23 $int = $ffi->new("int");
H A Dgh11934b.phpt4 ffi
12 $ffi = FFI::cdef($header);
13 $ffi->gh11934b_ffi_var_test_cdata->cdata = 2;
14 var_dump($ffi->gh11934b_ffi_var_test_cdata);
15 $source = $ffi->new('int');
17 $ffi->gh11934b_ffi_var_test_cdata = $source;
18 var_dump($ffi->gh11934b_ffi_var_test_cdata);
H A Dweak_reference_001.phpt4 ffi
6 ffi.enable=1
9 $ffi = \FFI::cdef('');
10 $ref = \WeakReference::create($ffi);
11 var_dump($ref->get() === $ffi);
12 unset($ffi);
H A D014.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef();
11 var_dump(FFI::sizeof($ffi->new("uint32_t[2]")));
12 var_dump(FFI::sizeof($ffi->new("uint32_t([2])")));
13 var_dump(FFI::sizeof($ffi->new("uint32_t([2])[2]")));
H A D004.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef(<<<EOF
35 var_dump($ffi->new("enum _a"));
36 var_dump($ffi->new("enum _b"));
37 var_dump($ffi->new("c"));
38 var_dump($ffi->new("d"));
39 var_dump($ffi->new("int[_c2]"));
40 var_dump($ffi->new("int[_c3]"));
41 var_dump($ffi->new("int[_c4]"));
[all …]
H A D007.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef();
11 $v = $ffi->new("int*[3]");
12 $v[0] = $ffi->new("int[1]", false);
13 $v[1] = $ffi->new("int[1]", false);
H A D033.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef();
11 $p1 = $ffi->new("uint8_t[2]");
12 $p2 = $ffi->new("uint16_t[2]", true, true);
18 $p4 = $ffi->new($t1);
21 $t2 = $ffi->type("uint16_t[2]");
23 $p4 = $ffi->new($t2);
26 $t2 = $ffi->type("uint32_t");
H A Dgh8433.phpt4 ffi
6 ffi.enable=1
10 $ffi = FFI::cdef("typedef struct { int a; } bar;");
11 $x = $ffi->new("bar(*)(void)");
12 FFI::addr($x)[0] = function() use ($ffi) {
13 $bar = $ffi->new("bar");
H A D011.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef();
11 $a = $ffi->new("uint8_t[4]");
14 var_dump($ffi->cast("uint16_t[2]", $a));
H A D023.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef();
12 var_dump(FFI::sizeof($ffi->new("struct {}")));
16 var_dump(FFI::sizeof($ffi->new("struct {int a}")));
17 var_dump(FFI::sizeof($ffi->new("struct {int a; int b}")));
H A Dtrampoline_reset.phpt4 ffi
14 ffi.enable=1
31 $ffi = FFI::cdef($header, 'libc.so.6');
35 $ffi->fprintf($ffi->stdout, "FFI\n");
36 $ffi->fflush($ffi->stdout);
H A D302.phpt4 ffi
8 ffi.enable=1
9 ffi.preload={PWD}/300.h
12 $ffi = FFI::scope("TEST_300");
13 $ffi->printf("Hello World from %s!\n", "PHP");
H A D003.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef(<<<EOF
28 var_dump($ffi->new("struct _a"));
29 var_dump($ffi->new("struct _b"));
30 var_dump($ffi->new("c"));
31 var_dump($ffi->new("d"));
33 var_dump($ffi->new("struct _e"));
38 var_dump($ffi->new("f"));
H A D029.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef("
13 var_dump(FFI::sizeof($ffi->new("struct {char a; t1 b;}")));
14 var_dump(FFI::sizeof($ffi->new("struct {char a; t2 b;}")));
H A D303.phpt4 ffi
8 ffi.enable=1
9 ffi.preload={PWD}/300*.h
12 $ffi = FFI::scope("TEST_300");
13 $ffi->printf("Hello World from %s!\n", "PHP");
H A D030.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef();
11 var_dump(FFI::sizeof($ffi->new("bool[2]")));
12 $p = $ffi->new("bool[2]");
H A D005.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef();
11 $m = $ffi->new("int[2][2]");
12 $v = $ffi->new("int[2]");
H A D038.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef();
11 $a = $ffi->new("int[10]");
15 $p = $ffi->cast("int*", $a);
H A D006.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef();
11 $v = $ffi->new("int*[2]");
12 $v[1] = $ffi->new("int[1]", false);
H A D034.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef();
11 $p1 = $ffi->new("uint8_t[2]");
12 $p2 = $ffi->new("uint16_t[2]");
13 $p3 = $ffi->new("uint32_t[2]");
/php-src/ext/ffi/
H A Dconfig.w321 ARG_WITH('ffi', 'ffi support', 'no');
4 if (CHECK_HEADER_ADD_INCLUDE("ffi.h", "CFLAGS_FFI", PHP_FFI+ ";" + PHP_PHP_BUILD + "\\include") &&
5 CHECK_LIB("libffi.lib", "ffi", PHP_FFI)) {
6 AC_DEFINE('HAVE_FFI', 1, "Define to 1 if the PHP extension 'ffi' is available.");
20 EXTENSION('ffi', 'ffi.c ffi_parser.c', null, '/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1');
22 WARNING('ffi not enabled, headers or libraries not found');
H A Dconfig.m41 PHP_ARG_WITH([ffi],
3 [AS_HELP_STRING([--with-ffi],
13 [Define to 1 if the PHP extension 'ffi' is available.])
21 [#include <ffi.h>])])
34 PHP_NEW_EXTENSION([ffi],
35 [ffi.c ffi_parser.c],

Completed in 42 milliseconds

12345