Sign in
pigweed
/
third_party
/
github
/
bazelbuild
/
bazel-central-registry
/
5561e46f15d4adca81e076045bf43e5998fd6713
/
.
/
modules
/
libffi
/
3.4.7.bcr.3
/
overlay
/
libffi.bzl
blob: ff415b88736fca9f0f1bc6e0be4d1f7465b68e5d [
file
]
"""Utils for libffi."""
def
define
(
key
,
value
):
if
value
==
None
:
return
"/* #undef %s */"
%
key
else
:
return
"#define %s %s"
%
(
key
,
value
)
def
substitutions
(
input
):
return
{
"@%s@"
%
k
:
define
(
k
,
v
)
for
k
,
v
in
input
.
items
()}