(f)
| 24 | """Decorator for extension functions whose exported symbol name can vary by ABI.""" |
| 25 | |
| 26 | def decorator(f): |
| 27 | missing: list[str] = [] |
| 28 | for name in names: |
| 29 | try: |
| 30 | func = getattr(_lib, name) |
| 31 | except AttributeError: |
| 32 | missing.append(name) |
| 33 | continue |
| 34 | func.argtypes = argtypes |
| 35 | func.restype = restype |
| 36 | functools.wraps(f)(func) |
| 37 | return func |
| 38 | raise AttributeError( |
| 39 | f"None of the shared library symbols were found: {', '.join(missing)}" |
| 40 | ) |
| 41 | |
| 42 | return decorator |
| 43 |
nothing calls this directly
no test coverage detected
searching dependent graphs…