1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Cleanup headers in irr/include/ (#15181)

This commit is contained in:
DS 2024-10-18 10:58:32 +02:00 committed by GitHub
parent f2ab887644
commit e5d321d286
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
51 changed files with 76 additions and 180 deletions

View file

@ -198,7 +198,7 @@ local consts = List();
-- Parse a whole header, extracting the data.
local function ParseHeader( path, into, apiRegex, defs, consts, nameSet, noNewNames )
defs:AddFormat( "\t// %s", path );
local f = assert( io.open( path, "r" ), "Could not open " .. path );
local f = assert( io.open( path, "r" ) );
for line in f:lines() do
-- Do not parse PFN typedefs; they're easily reconstructible.
local T, rawName, args = line:match( apiRegex );
@ -340,7 +340,7 @@ end
------------ Write files ------------
-- Write loader header
local f = io.open( sourceTreePath .. "/include/mt_opengl.h", "wb" );
local f = assert(io.open( sourceTreePath .. "/include/mt_opengl.h", "wb" ));
f:write[[
// This code was generated by scripts/BindingGenerator.lua
// Do not modify it, modify and run the generator instead.
@ -350,7 +350,6 @@ f:write[[
#include <string>
#include <unordered_set>
#include "IrrCompileConfig.h" // for IRRLICHT_API
#include "irrTypes.h"
#include "IContextManager.h"
#include <KHR/khrplatform.h>
@ -408,7 +407,7 @@ f:write( "IRRLICHT_API extern OpenGLProcedures GL;\n" );
f:close();
-- Write loader implementation
f = io.open( sourceTreePath .. "/src/mt_opengl_loader.cpp", "wb" );
f = assert(io.open( sourceTreePath .. "/src/mt_opengl_loader.cpp", "wb" ));
f:write[[
// This code was generated by scripts/BindingGenerator.lua
// Do not modify it, modify and run the generator instead.