diff options
| author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-06-27 11:15:37 -1000 | 
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2017-06-27 14:15:37 -0700 | 
| commit | 491fd7cc5aefff8064039d073331b41a2f606a63 (patch) | |
| tree | bef92b0c9f0f3daad2f377acdb1fed28f3899fd9 /src/_cffi_src/utils.py | |
| parent | 0145873de724744ca9ec584f0fc7c51079b2e68e (diff) | |
| download | cryptography-491fd7cc5aefff8064039d073331b41a2f606a63.tar.gz cryptography-491fd7cc5aefff8064039d073331b41a2f606a63.tar.bz2 cryptography-491fd7cc5aefff8064039d073331b41a2f606a63.zip  | |
Funcs macros gone (#3695)
* No more FUNCS/MACROS distinction
* change the docs to not talk about MACROS since they're gone
* remove out of date comment
Diffstat (limited to 'src/_cffi_src/utils.py')
| -rw-r--r-- | src/_cffi_src/utils.py | 16 | 
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,  | 
