MCPcopy Create free account
hub / github.com/numpy/numpy / check_inline

Function check_inline

numpy/distutils/command/autodist.py:8–28  ·  view source on GitHub ↗

Return the inline identifier (may be empty).

(cmd)

Source from the content-addressed store, hash-verified

6# We put them here since they could be easily reused outside numpy.distutils
7
8def check_inline(cmd):
9 """Return the inline identifier (may be empty)."""
10 cmd._check_compiler()
11 body = textwrap.dedent("""
12 #ifndef __cplusplus
13 static %(inline)s int static_func (void)
14 {
15 return 0;
16 }
17 %(inline)s int nostatic_func (void)
18 {
19 return 0;
20 }
21 #endif""")
22
23 for kw in ['inline', '__inline__', '__inline']:
24 st = cmd.try_compile(body % {'inline': kw}, None, None)
25 if st:
26 return kw
27
28 return ''
29
30
31def check_restrict(cmd):

Callers 1

check_inlineMethod · 0.90

Calls 1

_check_compilerMethod · 0.80

Tested by

no test coverage detected