We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a8518b commit 05ef57fCopy full SHA for 05ef57f
ext/ffi/tests/trampoline_reset.phpt
@@ -22,16 +22,22 @@ class Test
22
}
23
24
25
-Test::works1();
26
-Test::works2();
+$header = '
+typedef struct _IO_FILE FILE;
27
+extern FILE *stdout;
28
+int fprintf(FILE *, const char *, ...);
29
+int fflush(FILE *);
30
+';
31
+$ffi = FFI::cdef($header, 'libc.so.6');
32
-$ffi = FFI::cdef('int printf(const char *format, ...);', 'libc.so.6');
-$ffi->printf("Hello %s!\n", "world");
-
-Test::breaks();
33
+Test::foo();
34
+Test::bar();
35
+$ffi->fprintf($ffi->stdout, "FFI\n");
36
+$ffi->fflush($ffi->stdout);
37
+Test::baz();
38
?>
39
--EXPECT--
-works1 called
-works2 called
-breaks called
-Hello world!
40
+foo called
41
+bar called
42
+FFI
43
+baz called
0 commit comments