mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-07 01:54:10 +00:00
cxxrtl: use static inline
instead of inline
in the C API.
In C, non-static inline functions require an implementation elsewhere (even though the body is right there in the header). It is basically never desirable to use those as opposed to static inline ones.
This commit is contained in:
parent
ab9e2f4fda
commit
3d3ea5099d
|
@ -272,7 +272,7 @@ struct cxxrtl_object *cxxrtl_get_parts(cxxrtl_handle handle, const char *name, s
|
|||
// This function is a shortcut for the most common use of `cxxrtl_get_parts`. It asserts that,
|
||||
// if the object exists, it consists of a single part. If assertions are disabled, it returns NULL
|
||||
// for multi-part objects.
|
||||
inline struct cxxrtl_object *cxxrtl_get(cxxrtl_handle handle, const char *name) {
|
||||
static inline struct cxxrtl_object *cxxrtl_get(cxxrtl_handle handle, const char *name) {
|
||||
size_t parts = 0;
|
||||
struct cxxrtl_object *object = cxxrtl_get_parts(handle, name, &parts);
|
||||
assert(object == NULL || parts == 1);
|
||||
|
|
Loading…
Reference in a new issue