q66 / cffi-lua

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

`unsigned short int` throws an error #32

Closed mbekkomo closed 2 years ago

mbekkomo commented 2 years 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
]]