Skip to content

Proposal for standard 1.0 API

drernie edited this page Sep 13, 2010 · 3 revisions

This document is a work in progress. For the latest status, please see the ongoing mailing list thread .

Built-In Types

Fundamental Types

Platform Independent

  • int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64, pointer, string, buffer

Platform Dependent

  • char, uchar, int, uint, long, ulong, float, double

Composite Types

  • struct
  • callback

Users [implementations?] would have the ability to add their own aliases for structs, etc.

System Types

In addition, I believe the unix types provided by sys/types.h should be made available by requesting so. Perhaps calling “FFI.add_sys_types” would be fine (this as opposed to a require so that it can be calculated entirely at runtime if need be)

Clone this wiki locally