Skip to content
This repository was archived by the owner on Apr 19, 2025. It is now read-only.
/ lua-cpp Public archive

Moved to Codeberg, this repo is just a (temporary) mirror -- lcpp uses cpp to preprocess C header files and extract `#define'd` constants.

License

Notifications You must be signed in to change notification settings

CDSoft/lua-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lua / CPP interface

lcpp uses cpp to preprocess C header files and extract #define'd constants.

Usage

lcpp = require "lcpp"

constants = lcpp.include("foo.h", {"inc"})

for name, val in pairs(constants) do
    print(name, val)
end

The include function takes two parameters:

  1. name of the header file to parse
  2. optional list of directories to search for header files

and returns a table with all the constants defined in the main header file.

Tests

make test

About

Moved to Codeberg, this repo is just a (temporary) mirror -- lcpp uses cpp to preprocess C header files and extract `#define'd` constants.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published