newLISP ctypes module

Started by ryuo, July 23, 2014, 06:01:04 AM

Previous topic - Next topic

ryuo

I have been working on a module to assist with mapping types from the C programming language to newLISP. The idea is to have an API that can help translate sections of the C API by providing aliases for C types and convenient lambda macros for mapping user-defined types. Currently, the only user-defined type that has a lambda macro is enumerated types. The define-enum function creates a set of integer constants that mimic the behavior of C enumerated types as much as possible. The source is available here: https://github.com/ryuo/newlisp-modules/blob/master/ctypes/ctypes.lsp">https://github.com/ryuo/newlisp-modules ... ctypes.lsp">https://github.com/ryuo/newlisp-modules/blob/master/ctypes/ctypes.lsp



It would be nice if at least part of this module could be added to the official newLISP distribution. However, I am happy to just use it for my own modules. The module still needs more work, but it does include the few things I have found missing from the newLISP API for C types and such. Thanks for reading.

Lutz

#1
There is now a link to your modules on this page: http://www.newlisp.org/modules/">http://www.newlisp.org/modules/