mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 14:36:16 +01:00
applied patch from Darin Adler <darin@eazel.com> which supplies
Wed Jul 26 00:46:03 2000 Tim Janik <timj@gtk.org> * glib.h: applied patch from Darin Adler <darin@eazel.com> which supplies g_return_if_reached(), g_return_val_if_reached() and g_critical().
This commit is contained in:
parent
18ac8965f8
commit
623efc182c
@ -1,3 +1,9 @@
|
|||||||
|
Wed Jul 26 00:46:03 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h: applied patch from Darin Adler <darin@eazel.com> which
|
||||||
|
supplies g_return_if_reached(), g_return_val_if_reached() and
|
||||||
|
g_critical().
|
||||||
|
|
||||||
2000-07-22 Tor Lillqvist <tml@iki.fi>
|
2000-07-22 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* build-dll: Fix resource handling, the resource file got left out
|
* build-dll: Fix resource handling, the resource file got left out
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Jul 26 00:46:03 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h: applied patch from Darin Adler <darin@eazel.com> which
|
||||||
|
supplies g_return_if_reached(), g_return_val_if_reached() and
|
||||||
|
g_critical().
|
||||||
|
|
||||||
2000-07-22 Tor Lillqvist <tml@iki.fi>
|
2000-07-22 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* build-dll: Fix resource handling, the resource file got left out
|
* build-dll: Fix resource handling, the resource file got left out
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Jul 26 00:46:03 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h: applied patch from Darin Adler <darin@eazel.com> which
|
||||||
|
supplies g_return_if_reached(), g_return_val_if_reached() and
|
||||||
|
g_critical().
|
||||||
|
|
||||||
2000-07-22 Tor Lillqvist <tml@iki.fi>
|
2000-07-22 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* build-dll: Fix resource handling, the resource file got left out
|
* build-dll: Fix resource handling, the resource file got left out
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Jul 26 00:46:03 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h: applied patch from Darin Adler <darin@eazel.com> which
|
||||||
|
supplies g_return_if_reached(), g_return_val_if_reached() and
|
||||||
|
g_critical().
|
||||||
|
|
||||||
2000-07-22 Tor Lillqvist <tml@iki.fi>
|
2000-07-22 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* build-dll: Fix resource handling, the resource file got left out
|
* build-dll: Fix resource handling, the resource file got left out
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Jul 26 00:46:03 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h: applied patch from Darin Adler <darin@eazel.com> which
|
||||||
|
supplies g_return_if_reached(), g_return_val_if_reached() and
|
||||||
|
g_critical().
|
||||||
|
|
||||||
2000-07-22 Tor Lillqvist <tml@iki.fi>
|
2000-07-22 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* build-dll: Fix resource handling, the resource file got left out
|
* build-dll: Fix resource handling, the resource file got left out
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Jul 26 00:46:03 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h: applied patch from Darin Adler <darin@eazel.com> which
|
||||||
|
supplies g_return_if_reached(), g_return_val_if_reached() and
|
||||||
|
g_critical().
|
||||||
|
|
||||||
2000-07-22 Tor Lillqvist <tml@iki.fi>
|
2000-07-22 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* build-dll: Fix resource handling, the resource file got left out
|
* build-dll: Fix resource handling, the resource file got left out
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Jul 26 00:46:03 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h: applied patch from Darin Adler <darin@eazel.com> which
|
||||||
|
supplies g_return_if_reached(), g_return_val_if_reached() and
|
||||||
|
g_critical().
|
||||||
|
|
||||||
2000-07-22 Tor Lillqvist <tml@iki.fi>
|
2000-07-22 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* build-dll: Fix resource handling, the resource file got left out
|
* build-dll: Fix resource handling, the resource file got left out
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Jul 26 00:46:03 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* glib.h: applied patch from Darin Adler <darin@eazel.com> which
|
||||||
|
supplies g_return_if_reached(), g_return_val_if_reached() and
|
||||||
|
g_critical().
|
||||||
|
|
||||||
2000-07-22 Tor Lillqvist <tml@iki.fi>
|
2000-07-22 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* build-dll: Fix resource handling, the resource file got left out
|
* build-dll: Fix resource handling, the resource file got left out
|
||||||
|
60
glib.h
60
glib.h
@ -426,6 +426,8 @@ extern "C" {
|
|||||||
|
|
||||||
#define g_return_if_fail(expr)
|
#define g_return_if_fail(expr)
|
||||||
#define g_return_val_if_fail(expr,val)
|
#define g_return_val_if_fail(expr,val)
|
||||||
|
#define g_return_if_reached() return
|
||||||
|
#define g_return_val_if_reached(val) return (val)
|
||||||
|
|
||||||
#else /* !G_DISABLE_CHECKS */
|
#else /* !G_DISABLE_CHECKS */
|
||||||
|
|
||||||
@ -436,7 +438,7 @@ extern "C" {
|
|||||||
{ \
|
{ \
|
||||||
g_log (G_LOG_DOMAIN, \
|
g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_CRITICAL, \
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
"file %s: line %d (%s): assertion `%s' failed.", \
|
"file %s: line %d (%s): assertion `%s' failed", \
|
||||||
__FILE__, \
|
__FILE__, \
|
||||||
__LINE__, \
|
__LINE__, \
|
||||||
__PRETTY_FUNCTION__, \
|
__PRETTY_FUNCTION__, \
|
||||||
@ -449,14 +451,32 @@ extern "C" {
|
|||||||
{ \
|
{ \
|
||||||
g_log (G_LOG_DOMAIN, \
|
g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_CRITICAL, \
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
"file %s: line %d (%s): assertion `%s' failed.", \
|
"file %s: line %d (%s): assertion `%s' failed", \
|
||||||
__FILE__, \
|
__FILE__, \
|
||||||
__LINE__, \
|
__LINE__, \
|
||||||
__PRETTY_FUNCTION__, \
|
__PRETTY_FUNCTION__, \
|
||||||
#expr); \
|
#expr); \
|
||||||
return val; \
|
return (val); \
|
||||||
}; }G_STMT_END
|
}; }G_STMT_END
|
||||||
|
|
||||||
|
#define g_return_if_reached() G_STMT_START{ \
|
||||||
|
g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
|
"file %s: line %d (%s): assertion `%s' failed", \
|
||||||
|
__FILE__, \
|
||||||
|
__LINE__, \
|
||||||
|
__PRETTY_FUNCTION__); \
|
||||||
|
return; }G_STMT_END
|
||||||
|
|
||||||
|
#define g_return_val_if_reached(val) G_STMT_START{ \
|
||||||
|
g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
|
"file %s: line %d (%s): should not be reached", \
|
||||||
|
__FILE__, \
|
||||||
|
__LINE__, \
|
||||||
|
__PRETTY_FUNCTION__); \
|
||||||
|
return (val); }G_STMT_END
|
||||||
|
|
||||||
#else /* !__GNUC__ */
|
#else /* !__GNUC__ */
|
||||||
|
|
||||||
#define g_return_if_fail(expr) G_STMT_START{ \
|
#define g_return_if_fail(expr) G_STMT_START{ \
|
||||||
@ -464,7 +484,7 @@ extern "C" {
|
|||||||
{ \
|
{ \
|
||||||
g_log (G_LOG_DOMAIN, \
|
g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_CRITICAL, \
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
"file %s: line %d: assertion `%s' failed.", \
|
"file %s: line %d: assertion `%s' failed", \
|
||||||
__FILE__, \
|
__FILE__, \
|
||||||
__LINE__, \
|
__LINE__, \
|
||||||
#expr); \
|
#expr); \
|
||||||
@ -476,13 +496,29 @@ extern "C" {
|
|||||||
{ \
|
{ \
|
||||||
g_log (G_LOG_DOMAIN, \
|
g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_CRITICAL, \
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
"file %s: line %d: assertion `%s' failed.", \
|
"file %s: line %d: assertion `%s' failed", \
|
||||||
__FILE__, \
|
__FILE__, \
|
||||||
__LINE__, \
|
__LINE__, \
|
||||||
#expr); \
|
#expr); \
|
||||||
return val; \
|
return (val); \
|
||||||
}; }G_STMT_END
|
}; }G_STMT_END
|
||||||
|
|
||||||
|
#define g_return_if_reached() G_STMT_START{ \
|
||||||
|
g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
|
"file %s: line %d: assertion `%s' failed", \
|
||||||
|
__FILE__, \
|
||||||
|
__LINE__); \
|
||||||
|
return; }G_STMT_END
|
||||||
|
|
||||||
|
#define g_return_val_if_reached(val) G_STMT_START{ \
|
||||||
|
g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
|
"file %s: line %d: should not be reached", \
|
||||||
|
__FILE__, \
|
||||||
|
__LINE__); \
|
||||||
|
return (val); }G_STMT_END
|
||||||
|
|
||||||
#endif /* !__GNUC__ */
|
#endif /* !__GNUC__ */
|
||||||
|
|
||||||
#endif /* !G_DISABLE_CHECKS */
|
#endif /* !G_DISABLE_CHECKS */
|
||||||
@ -1442,6 +1478,9 @@ GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask);
|
|||||||
#define g_message(format, args...) g_log (G_LOG_DOMAIN, \
|
#define g_message(format, args...) g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_MESSAGE, \
|
G_LOG_LEVEL_MESSAGE, \
|
||||||
format, ##args)
|
format, ##args)
|
||||||
|
#define g_critical(format, args...) g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
|
format, ##args)
|
||||||
#define g_warning(format, args...) g_log (G_LOG_DOMAIN, \
|
#define g_warning(format, args...) g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_WARNING, \
|
G_LOG_LEVEL_WARNING, \
|
||||||
format, ##args)
|
format, ##args)
|
||||||
@ -1465,6 +1504,15 @@ g_message (const gchar *format,
|
|||||||
va_end (args);
|
va_end (args);
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
|
g_critical (const gchar *format,
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start (args, format);
|
||||||
|
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, format, args);
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
|
static void
|
||||||
g_warning (const gchar *format,
|
g_warning (const gchar *format,
|
||||||
...)
|
...)
|
||||||
{
|
{
|
||||||
|
60
glib/glib.h
60
glib/glib.h
@ -426,6 +426,8 @@ extern "C" {
|
|||||||
|
|
||||||
#define g_return_if_fail(expr)
|
#define g_return_if_fail(expr)
|
||||||
#define g_return_val_if_fail(expr,val)
|
#define g_return_val_if_fail(expr,val)
|
||||||
|
#define g_return_if_reached() return
|
||||||
|
#define g_return_val_if_reached(val) return (val)
|
||||||
|
|
||||||
#else /* !G_DISABLE_CHECKS */
|
#else /* !G_DISABLE_CHECKS */
|
||||||
|
|
||||||
@ -436,7 +438,7 @@ extern "C" {
|
|||||||
{ \
|
{ \
|
||||||
g_log (G_LOG_DOMAIN, \
|
g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_CRITICAL, \
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
"file %s: line %d (%s): assertion `%s' failed.", \
|
"file %s: line %d (%s): assertion `%s' failed", \
|
||||||
__FILE__, \
|
__FILE__, \
|
||||||
__LINE__, \
|
__LINE__, \
|
||||||
__PRETTY_FUNCTION__, \
|
__PRETTY_FUNCTION__, \
|
||||||
@ -449,14 +451,32 @@ extern "C" {
|
|||||||
{ \
|
{ \
|
||||||
g_log (G_LOG_DOMAIN, \
|
g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_CRITICAL, \
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
"file %s: line %d (%s): assertion `%s' failed.", \
|
"file %s: line %d (%s): assertion `%s' failed", \
|
||||||
__FILE__, \
|
__FILE__, \
|
||||||
__LINE__, \
|
__LINE__, \
|
||||||
__PRETTY_FUNCTION__, \
|
__PRETTY_FUNCTION__, \
|
||||||
#expr); \
|
#expr); \
|
||||||
return val; \
|
return (val); \
|
||||||
}; }G_STMT_END
|
}; }G_STMT_END
|
||||||
|
|
||||||
|
#define g_return_if_reached() G_STMT_START{ \
|
||||||
|
g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
|
"file %s: line %d (%s): assertion `%s' failed", \
|
||||||
|
__FILE__, \
|
||||||
|
__LINE__, \
|
||||||
|
__PRETTY_FUNCTION__); \
|
||||||
|
return; }G_STMT_END
|
||||||
|
|
||||||
|
#define g_return_val_if_reached(val) G_STMT_START{ \
|
||||||
|
g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
|
"file %s: line %d (%s): should not be reached", \
|
||||||
|
__FILE__, \
|
||||||
|
__LINE__, \
|
||||||
|
__PRETTY_FUNCTION__); \
|
||||||
|
return (val); }G_STMT_END
|
||||||
|
|
||||||
#else /* !__GNUC__ */
|
#else /* !__GNUC__ */
|
||||||
|
|
||||||
#define g_return_if_fail(expr) G_STMT_START{ \
|
#define g_return_if_fail(expr) G_STMT_START{ \
|
||||||
@ -464,7 +484,7 @@ extern "C" {
|
|||||||
{ \
|
{ \
|
||||||
g_log (G_LOG_DOMAIN, \
|
g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_CRITICAL, \
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
"file %s: line %d: assertion `%s' failed.", \
|
"file %s: line %d: assertion `%s' failed", \
|
||||||
__FILE__, \
|
__FILE__, \
|
||||||
__LINE__, \
|
__LINE__, \
|
||||||
#expr); \
|
#expr); \
|
||||||
@ -476,13 +496,29 @@ extern "C" {
|
|||||||
{ \
|
{ \
|
||||||
g_log (G_LOG_DOMAIN, \
|
g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_CRITICAL, \
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
"file %s: line %d: assertion `%s' failed.", \
|
"file %s: line %d: assertion `%s' failed", \
|
||||||
__FILE__, \
|
__FILE__, \
|
||||||
__LINE__, \
|
__LINE__, \
|
||||||
#expr); \
|
#expr); \
|
||||||
return val; \
|
return (val); \
|
||||||
}; }G_STMT_END
|
}; }G_STMT_END
|
||||||
|
|
||||||
|
#define g_return_if_reached() G_STMT_START{ \
|
||||||
|
g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
|
"file %s: line %d: assertion `%s' failed", \
|
||||||
|
__FILE__, \
|
||||||
|
__LINE__); \
|
||||||
|
return; }G_STMT_END
|
||||||
|
|
||||||
|
#define g_return_val_if_reached(val) G_STMT_START{ \
|
||||||
|
g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
|
"file %s: line %d: should not be reached", \
|
||||||
|
__FILE__, \
|
||||||
|
__LINE__); \
|
||||||
|
return (val); }G_STMT_END
|
||||||
|
|
||||||
#endif /* !__GNUC__ */
|
#endif /* !__GNUC__ */
|
||||||
|
|
||||||
#endif /* !G_DISABLE_CHECKS */
|
#endif /* !G_DISABLE_CHECKS */
|
||||||
@ -1442,6 +1478,9 @@ GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask);
|
|||||||
#define g_message(format, args...) g_log (G_LOG_DOMAIN, \
|
#define g_message(format, args...) g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_MESSAGE, \
|
G_LOG_LEVEL_MESSAGE, \
|
||||||
format, ##args)
|
format, ##args)
|
||||||
|
#define g_critical(format, args...) g_log (G_LOG_DOMAIN, \
|
||||||
|
G_LOG_LEVEL_CRITICAL, \
|
||||||
|
format, ##args)
|
||||||
#define g_warning(format, args...) g_log (G_LOG_DOMAIN, \
|
#define g_warning(format, args...) g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_WARNING, \
|
G_LOG_LEVEL_WARNING, \
|
||||||
format, ##args)
|
format, ##args)
|
||||||
@ -1465,6 +1504,15 @@ g_message (const gchar *format,
|
|||||||
va_end (args);
|
va_end (args);
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
|
g_critical (const gchar *format,
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start (args, format);
|
||||||
|
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, format, args);
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
|
static void
|
||||||
g_warning (const gchar *format,
|
g_warning (const gchar *format,
|
||||||
...)
|
...)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user