q66 / cffi-lua

A portable C FFI for Lua 5.1+
MIT License
176 stars 24 forks source link

`unsigned short int` throws an error #32

Closed cattokomo closed 1 year ago

cattokomo commented 1 year ago

Hello 👋

So, I have a problem with defiining an unsigned short int. In LuaJIT's ffi, defining unsigned short int does valid, but in cffi-lua, it throws an error.

local cffi = require 'cffi'

cffi.cdef[[
unsigned short int myInt; // <-- Error/Invalid 
unsigned int myOtherInt; // <-- Valid
]]