Sha256: 2fedef6bff435d2a88efa7ced12aa6e751fd5d9c2a15e4f6cd1316ed26a8416e

Contents?: true

Size: 975 Bytes

Versions: 6

Compression:

Stored size: 975 Bytes

Contents

#ifndef _TYPES_H
#define	_TYPES_H

#ifdef	__cplusplus
extern "C" {
#endif
#ifdef VOID
#  undef VOID
#endif
typedef enum {
    NATIVE_VOID,
    NATIVE_INT8,
    NATIVE_UINT8,
    NATIVE_INT16,
    NATIVE_UINT16,
    NATIVE_INT32,
    NATIVE_UINT32,
    NATIVE_INT64,
    NATIVE_UINT64,
    NATIVE_FLOAT32,
    NATIVE_FLOAT64,
    NATIVE_POINTER,
    NATIVE_CALLBACK,
    NATIVE_BUFFER_IN,
    NATIVE_BUFFER_OUT,
    NATIVE_BUFFER_INOUT,
    NATIVE_CHAR_ARRAY,
    
    /**
     * An immutable string.  Nul terminated, but only copies in to the native function
     */
    NATIVE_STRING,
    /** A Rubinus :string arg - copies data both ways, and nul terminates */
    NATIVE_RBXSTRING,
    /** The function takes a variable number of arguments */
    NATIVE_VARARGS,
} NativeType;

#include <ffi.h>
extern ffi_type* rb_FFI_NativeTypeToFFI(NativeType type);
VALUE rb_FFI_NativeValueToRuby(NativeType type, const void* ptr);

#ifdef	__cplusplus
}
#endif

#endif	/* _TYPES_H */

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ffi-0.3.1 ext/ffi_c/Types.h
ffi-0.3.0 ext/ffi_c/Types.h
ffi-0.3.4 ext/ffi_c/Types.h
ffi-0.3.5 ext/ffi_c/Types.h
ffi-0.3.2 ext/ffi_c/Types.h
ffi-0.3.3 ext/ffi_c/Types.h