• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# This file is dual licensed under the terms of the Apache License, Version
2# 2.0, and the BSD License. See the LICENSE file in the root of this repository
3# for complete details.
4
5from __future__ import absolute_import, division, print_function
6
7import os
8
9from _cffi_src.utils import build_ffi, compiler_type, extra_link_args
10
11
12with open(
13    os.path.join(os.path.dirname(__file__), "hazmat_src/padding.h")
14) as f:
15    types = f.read()
16
17with open(
18    os.path.join(os.path.dirname(__file__), "hazmat_src/padding.c")
19) as f:
20    functions = f.read()
21
22ffi = build_ffi(
23    module_name="_padding",
24    cdef_source=types,
25    verify_source=functions,
26    extra_link_args=extra_link_args(compiler_type()),
27)
28