Support for Inline Functions
I seem to have to jump through hoops to get C99 inline functions supported. Specifically, this is what I do:
In file.h:
#ifdef __GI_SCANNER__
gboolean gnm_cell_has_expr (GnmCell const *cell);
#else
inline gboolean
gnm_cell_has_expr (GnmCell const *cell) {
return cell->base.texpr != NULL;
}
#endif
In file.c:
// Provide the external version of inline functions, used mainly for
// introspection
/**
* gnm_cell_has_expr:
* @cell: #GnmCell
*
* Returns: %TRUE if @cell has an expression or %FALSE if it is empty
* or contains a value.
*/
extern inline gboolean gnm_cell_has_expr (GnmCell const *cell);
Do I really need that extra GI_SCANNER version in the header file? Having two copies is not pretty, so I am hoping I am just missing something obvious here.
/usr/bin/g-ir-scanner --version
g-ir-scanner 1.64.1