/cffi-size-t

A size-t CFFI type depending on the pointer size on your system.

Primary LanguageCommon LispMIT LicenseMIT

cffi-size-t

A size-t CFFI type depending on the pointer size on your system.

Installation

This project is not on quicklisp yet, but all it's dependencies (namely cffi) are. You can just clone this repository to one of your ql:*local-project-directories* and run:

(ql:quickload :cffi-size-t)

Usage

This system provides one package with one type:

cffi-size-t:size-t

Rationale

I have multiple Common Lisp projects providing CFFI bindings for C libraries and in each one I had to copy a definition of size-t. Once I just used an unsigned-int and things immediately broke. So here it is: a size-t depending on the pointer size of your system.

Acknowledgements

The original definition I used stems from 3b's Vulkan bindings.

The one this project provides stems from JTK's question about size-t.