aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/_cffi_src/utils.py')
-rw-r--r--src/_cffi_src/utils.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/_cffi_src/utils.py b/src/_cffi_src/utils.py
index 3a4dd773..d3dd18a4 100644
--- a/src/_cffi_src/utils.py
+++ b/src/_cffi_src/utils.py
@@ -18,8 +18,7 @@ def build_ffi_for_binding(module_name, module_prefix, modules, libraries=[],
* ``INCLUDES``: A string containing C includes.
* ``TYPES``: A string containing C declarations for types.
- * ``FUNCTIONS``: A string containing C declarations for functions.
- * ``MACROS``: A string containing C declarations for any macros.
+ * ``FUNCTIONS``: A string containing C declarations for functions & macros.
* ``CUSTOMIZATIONS``: A string containing arbitrary top-level C code, this
can be used to do things like test for a define and provide an
alternate implementation based on that.
@@ -27,34 +26,23 @@ def build_ffi_for_binding(module_name, module_prefix, modules, libraries=[],
types = []
includes = []
functions = []
- macros = []
customizations = []
for name in modules:
__import__(module_prefix + name)
module = sys.modules[module_prefix + name]
types.append(module.TYPES)
- macros.append(module.MACROS)
functions.append(module.FUNCTIONS)
includes.append(module.INCLUDES)
customizations.append(module.CUSTOMIZATIONS)
- # We include functions here so that if we got any of their definitions
- # wrong, the underlying C compiler will explode. In C you are allowed
- # to re-declare a function if it has the same signature. That is:
- # int foo(int);
- # int foo(int);
- # is legal, but the following will fail to compile:
- # int foo(int);
- # int foo(short);
verify_source = "\n".join(
includes +
- functions +
customizations
)
ffi = build_ffi(
module_name,
- cdef_source="\n".join(types + functions + macros),
+ cdef_source="\n".join(types + functions),
verify_source=verify_source,
libraries=libraries,
extra_compile_args=extra_compile_args,