[engine-helpers.h] key is a const char*

thus allowing compilation in cpp with stricter type checking
This commit is contained in:
Christopher Lam 2024-02-24 17:58:52 +08:00
parent c345fc9d3c
commit 229d9300cf
2 changed files with 4 additions and 4 deletions

View File

@ -189,7 +189,7 @@ gnc_book_option_num_field_source_change (gboolean num_action)
}
void
gnc_book_option_register_cb (gchar *key, GncBOCb func, gpointer user_data)
gnc_book_option_register_cb (const gchar *key, GncBOCb func, gpointer user_data)
{
GHookList *hook_list;
GHook *hook;
@ -216,7 +216,7 @@ gnc_book_option_register_cb (gchar *key, GncBOCb func, gpointer user_data)
}
void
gnc_book_option_remove_cb (gchar *key, GncBOCb func, gpointer user_data)
gnc_book_option_remove_cb (const gchar *key, GncBOCb func, gpointer user_data)
{
GHookList *hook_list;
GHook *hook;

View File

@ -77,11 +77,11 @@ gnc_book_option_num_field_source_change (gboolean num_action);
/** Registers callbacks to be called when the book option changes for the
* specified book option key */
void
gnc_book_option_register_cb (gchar *key, GncBOCb func, gpointer user_data);
gnc_book_option_register_cb (const gchar *key, GncBOCb func, gpointer user_data);
/** Removes previously registered callbacks for the specified book option key */
void
gnc_book_option_remove_cb (gchar *key, GncBOCb func, gpointer user_data);
gnc_book_option_remove_cb (const gchar *key, GncBOCb func, gpointer user_data);
#ifdef __cplusplus
}