From: whitequark Date: Sun, 20 Dec 2020 14:48:16 +0000 (+0000) Subject: cxxrtl: use `static inline` instead of `inline` in the C API. X-Git-Tag: working-ls180~159^2~2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3d3ea5099d50a3de7b76ea47189b5700956b2703;p=yosys.git 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. --- diff --git a/backends/cxxrtl/cxxrtl_capi.h b/backends/cxxrtl/cxxrtl_capi.h index 7d9c60ac5..2df2b7287 100644 --- a/backends/cxxrtl/cxxrtl_capi.h +++ b/backends/cxxrtl/cxxrtl_capi.h @@ -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);