blueloveTH 2 mesi fa
parent
commit
05c47f1023

+ 1 - 0
compile_flags.txt

@@ -4,5 +4,6 @@
 -std=c11
 -Iinclude/
 -I3rd/lz4/
+-I3rd/periphery/
 -I3rd/cute_png/include/
 -I3rd/msgpack/include/

+ 0 - 0
scripts/c_bind/c_bind/converters.py → ffigen/ffigen/converters.py


+ 0 - 0
scripts/c_bind/c_bind/enum.py → ffigen/ffigen/enum.py


+ 0 - 0
scripts/c_bind/c_bind/function.py → ffigen/ffigen/function.py


+ 1 - 1
scripts/c_bind/c_bind/library.py → ffigen/ffigen/library.py

@@ -157,7 +157,7 @@ class Library:
     
     @staticmethod
     def from_header(name: str, header: 'Header'):
-        from c_bind.meta import schema
+        from ffigen.meta import schema
         self = Library(name)
         for type in header.types:
             if isinstance(type, schema.NamedFields):

+ 0 - 0
scripts/c_bind/c_bind/meta/__init__.py → ffigen/ffigen/meta/__init__.py


+ 0 - 0
scripts/c_bind/c_bind/meta/parser.py → ffigen/ffigen/meta/parser.py


+ 0 - 0
scripts/c_bind/c_bind/meta/schema.py → ffigen/ffigen/meta/schema.py


+ 0 - 0
scripts/c_bind/c_bind/schema.py → ffigen/ffigen/schema.py


+ 0 - 0
scripts/c_bind/c_bind/struct.py → ffigen/ffigen/struct.py


+ 0 - 0
scripts/c_bind/c_bind/types.py → ffigen/ffigen/types.py


+ 0 - 0
scripts/c_bind/c_bind/writer.py → ffigen/ffigen/writer.py


+ 2 - 2
scripts/c_bind/gen_box2d.py → ffigen/gen_box2d.py

@@ -1,7 +1,7 @@
 import pcpp
 import pycparser
-from c_bind import Library, set_vmath_converter, set_enum_converters
-from c_bind.meta import Header
+from ffigen import Library, set_vmath_converter, set_enum_converters
+from ffigen.meta import Header
 import os
 
 path = '../3rd/box2d/include/box2d/box2d.h'

+ 4 - 3
scripts/c_bind/gen_periphery.py → ffigen/gen_periphery.py

@@ -1,7 +1,8 @@
 import pcpp
 import pycparser
-from c_bind import Library, set_vmath_converter, set_enum_converters
-from c_bind.meta import Header
+from ffigen.library import Library
+from ffigen.converters import set_vmath_converter, set_enum_converters
+from ffigen.meta import Header
 import os
 
 file_dir = os.path.dirname(os.path.abspath(__file__))
@@ -20,7 +21,7 @@ lib = Library.from_header('periphery', header)
 set_enum_converters([enum.name for enum in lib.enums])
 
 lib.build(
-    includes=['c-periphery/gpio.h'],
+    includes=['c-periphery/src/gpio.h'],
     glue_dir='3rd/periphery/src',
     stub_dir='include/typings'
 )

+ 1 - 1
scripts/c_bind/gen_raylib.py → ffigen/gen_raylib.py

@@ -1,5 +1,5 @@
 import json
-from c_bind import Library, set_vmath_converter
+from ffigen import Library, set_vmath_converter
 
 with open('../3rd/raylib/parser/output/raylib_api.json') as f:
     data = json.load(f)

+ 0 - 0
scripts/c_bind/libc_include/float.h → ffigen/libc_include/float.h


+ 0 - 0
scripts/c_bind/libc_include/math.h → ffigen/libc_include/math.h


+ 0 - 0
scripts/c_bind/libc_include/stdarg.h → ffigen/libc_include/stdarg.h


+ 0 - 0
scripts/c_bind/libc_include/stdbool.h → ffigen/libc_include/stdbool.h


+ 0 - 0
scripts/c_bind/libc_include/stddef.h → ffigen/libc_include/stddef.h


+ 0 - 0
scripts/c_bind/libc_include/stdint.h → ffigen/libc_include/stdint.h


+ 0 - 0
scripts/c_bind/requirements.txt → ffigen/requirements.txt


+ 0 - 7
scripts/c_bind/c_bind/__init__.py

@@ -1,7 +0,0 @@
-from .function import gen_function
-from .converters import get_converter, set_vmath_converter, set_enum_converters
-from .writer import Writer
-from .struct import gen_struct
-from .enum import gen_enum
-
-from .library import Library