1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/fiddle/fiddle.h
tenderlove 4bada8b864 * ext/fiddle/*: Adding fiddle library to wrap libffi
* test/fiddle/*: testing fiddle extension
* ext/dl/lib/dl.rb: Requiring fiddle if it is available
* ext/dl/lib/dl/callback.rb: using Fiddle if it is available
* ext/dl/lib/dl/func.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-06 06:59:24 +00:00

45 lines
740 B
C

#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: */