@@ -70,9 +70,9 @@ g_mime_parser_options_shutdown (void)
7070 if (default_options == NULL )
7171 return ;
7272
73- if (default_options -> notify ) {
74- default_options -> notify (default_options -> warning_user_data );
75- }
73+ if (default_options -> notify )
74+ default_options -> notify (default_options -> warning_user_data );
75+
7676 g_strfreev (default_options -> charsets );
7777 g_slice_free (GMimeParserOptions , default_options );
7878 default_options = NULL ;
@@ -193,9 +193,9 @@ g_mime_parser_options_free (GMimeParserOptions *options)
193193 g_return_if_fail (options != NULL );
194194
195195 if (options != default_options ) {
196- if (options -> notify ) {
197- options -> notify (options -> warning_user_data );
198- }
196+ if (options -> notify )
197+ options -> notify (options -> warning_user_data );
198+
199199 g_strfreev (options -> charsets );
200200 g_slice_free (GMimeParserOptions , options );
201201 }
@@ -450,18 +450,31 @@ g_mime_parser_options_get_warning_callback (GMimeParserOptions *options)
450450 * @options: a #GMimeParserOptions
451451 * @warning_cb: a #GMimeParserWarningFunc or %NULL to clear the callback
452452 * @user_data: data passed to the warning callback function
453+ *
454+ * Registers the callback function being called if the parser detects any issues.
455+ **/
456+ void
457+ g_mime_parser_options_set_warning_callback (GMimeParserOptions * options , GMimeParserWarningFunc warning_cb , gpointer user_data )
458+ {
459+ g_mime_parser_options_set_warning_callback_full (options , warning_cb , user_data , NULL );
460+ }
461+
462+ /**
463+ * g_mime_parser_options_set_warning_callback_full:
464+ * @options: a #GMimeParserOptions
465+ * @warning_cb: a #GMimeParserWarningFunc or %NULL to clear the callback
466+ * @user_data: data passed to the warning callback function
453467 * @notify: callback function ran on destruction
454468 *
455469 * Registers the callback function being called if the parser detects any issues.
456470 **/
457471void
458- g_mime_parser_options_set_warning_callback (GMimeParserOptions * options , GMimeParserWarningFunc warning_cb , gpointer user_data , GDestroyNotify notify )
472+ g_mime_parser_options_set_warning_callback_full (GMimeParserOptions * options , GMimeParserWarningFunc warning_cb , gpointer user_data , GDestroyNotify notify )
459473{
460474 g_return_if_fail (options != NULL );
461475
462- if (options -> notify ) {
463- options -> notify (options -> warning_user_data );
464- }
476+ if (options -> notify )
477+ options -> notify (options -> warning_user_data );
465478
466479 options -> warning_cb = warning_cb ;
467480 options -> warning_user_data = user_data ;
0 commit comments