Sha256: d2b9d8905693adc24a5009a7f6540e9ac781b7b0a0592b7bf11d90b541ed3b8e

Contents?: true

Size: 896 Bytes

Versions: 1

Compression:

Stored size: 896 Bytes

Contents

/* 
 * File:   Types.h
 * Author: wayne
 *
 * Created on September 9, 2008, 9:47 PM
 */

#ifndef _TYPES_H
#define	_TYPES_H

#ifdef	__cplusplus
extern "C" {
#endif
    
typedef enum {
    VOID,
    INT8,
    UINT8,
    INT16,
    UINT16,
    INT32,
    UINT32,
    INT64,
    UINT64,
    FLOAT32,
    FLOAT64,
    POINTER,
    CALLBACK,
    BUFFER_IN,
    BUFFER_OUT,
    BUFFER_INOUT,
    CHAR_ARRAY,
    
    /**
     * An immutable string.  Nul terminated, but only copies in to the native function
     */
    STRING,
    /** A Rubinus :string arg - copies data both ways, and nul terminates */
    RBXSTRING,
    /** The function takes a variable number of arguments */
    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

1 entries across 1 versions & 1 rubygems

Version Path
ffi-0.2.0 ext/Types.h