• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/ucode/tests/custom/17_lib_ffi/01_cdef

  1 The `ffi.cdef()` function parses C declaration strings and registers types
  2 and function prototypes with the FFI subsystem.
  3 
  4 -- Testcase --
  5 {%
  6 import * as ffi from 'ffi';
  7 
  8 ffi.cdef(`
  9     typedef int myint;
 10     typedef struct { int x; } mystruct;
 11     int global_var;
 12     int func(int a, const char *b);
 13 `);
 14 print("cdef OK\n");
 15 -- End --
 16 
 17 -- Expect stdout --
 18 cdef OK
 19 -- End --
 20 

This page was automatically generated by LXR 0.3.1.  •  OpenWrt