Return the inline identifier (may be empty).
(cmd)
| 6 | # We put them here since they could be easily reused outside numpy.distutils |
| 7 | |
| 8 | def 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 | |
| 31 | def check_restrict(cmd): |
no test coverage detected