summaryrefslogtreecommitdiff
path: root/ext/fiddle/fiddle.h
blob: 0c573871dc7d0604a8fdd31e3b41c1d6bd53e3ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef FIDDLE_H
#define FIDDLE_H

#include <ruby.h>
#include <errno.h>

#if defined(HAVE_WINDOWS_H)
#include <windows.h>
#endif

#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif

#ifdef USE_HEADER_HACKS
#include <ffi/ffi.h>
#else
#include <ffi.h>
#endif

#include <closure.h>
#include <conversions.h>
#include <function.h>

/* FIXME
 * These constants need to match up with DL. We need to refactor this to use
 * the DL header files or vice versa.
 */

#define TYPE_VOID  0
#define TYPE_VOIDP 1
#define TYPE_CHAR  2
#define TYPE_SHORT 3
#define TYPE_INT   4
#define TYPE_LONG  5
#if HAVE_LONG_LONG
#define TYPE_LONG_LONG 6
#endif
#define TYPE_FLOAT 7
#define TYPE_DOUBLE 8

extern VALUE mFiddle;

#endif
/* vim: set noet sws=4 sw=4: */