mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 10:38:08 +01:00
Added G_N_ELEMENTS macro to determine the number of elements in an array.
Fri Jan 21 10:18:24 2000 Owen Taylor <otaylor@redhat.com> * glib.h (G_N_ELEMENTS): Added G_N_ELEMENTS macro to determine the number of elements in an array.
This commit is contained in:
parent
9bee3ef88d
commit
948f64a183
@ -1,3 +1,8 @@
|
|||||||
|
Fri Jan 21 10:18:24 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib.h (G_N_ELEMENTS): Added G_N_ELEMENTS macro to determine
|
||||||
|
the number of elements in an array.
|
||||||
|
|
||||||
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
|
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
|
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Jan 21 10:18:24 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib.h (G_N_ELEMENTS): Added G_N_ELEMENTS macro to determine
|
||||||
|
the number of elements in an array.
|
||||||
|
|
||||||
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
|
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
|
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Jan 21 10:18:24 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib.h (G_N_ELEMENTS): Added G_N_ELEMENTS macro to determine
|
||||||
|
the number of elements in an array.
|
||||||
|
|
||||||
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
|
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
|
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Jan 21 10:18:24 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib.h (G_N_ELEMENTS): Added G_N_ELEMENTS macro to determine
|
||||||
|
the number of elements in an array.
|
||||||
|
|
||||||
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
|
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
|
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Jan 21 10:18:24 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib.h (G_N_ELEMENTS): Added G_N_ELEMENTS macro to determine
|
||||||
|
the number of elements in an array.
|
||||||
|
|
||||||
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
|
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
|
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Jan 21 10:18:24 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib.h (G_N_ELEMENTS): Added G_N_ELEMENTS macro to determine
|
||||||
|
the number of elements in an array.
|
||||||
|
|
||||||
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
|
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
|
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Jan 21 10:18:24 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib.h (G_N_ELEMENTS): Added G_N_ELEMENTS macro to determine
|
||||||
|
the number of elements in an array.
|
||||||
|
|
||||||
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
|
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
|
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Jan 21 10:18:24 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib.h (G_N_ELEMENTS): Added G_N_ELEMENTS macro to determine
|
||||||
|
the number of elements in an array.
|
||||||
|
|
||||||
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
|
Sun Jan 9 13:28:36 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
|
* gstrfuncs.c (g_strtod): correctly fetch the current locale,
|
||||||
|
5
glib.h
5
glib.h
@ -134,6 +134,11 @@ extern "C" {
|
|||||||
#define G_STRINGIFY(macro_or_string) G_STRINGIFY_ARG (macro_or_string)
|
#define G_STRINGIFY(macro_or_string) G_STRINGIFY_ARG (macro_or_string)
|
||||||
#define G_STRINGIFY_ARG(contents) #contents
|
#define G_STRINGIFY_ARG(contents) #contents
|
||||||
|
|
||||||
|
/* Count the number of elements in an array. The array must be defined
|
||||||
|
* as such; using this with a dynamically allocated array will give
|
||||||
|
* incorrect results.
|
||||||
|
*/
|
||||||
|
#define G_N_ELEMENTS(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||||
|
|
||||||
/* Define G_VA_COPY() to do the right thing for copying va_list variables.
|
/* Define G_VA_COPY() to do the right thing for copying va_list variables.
|
||||||
* glibconfig.h may have already defined G_VA_COPY as va_copy or __va_copy.
|
* glibconfig.h may have already defined G_VA_COPY as va_copy or __va_copy.
|
||||||
|
@ -134,6 +134,11 @@ extern "C" {
|
|||||||
#define G_STRINGIFY(macro_or_string) G_STRINGIFY_ARG (macro_or_string)
|
#define G_STRINGIFY(macro_or_string) G_STRINGIFY_ARG (macro_or_string)
|
||||||
#define G_STRINGIFY_ARG(contents) #contents
|
#define G_STRINGIFY_ARG(contents) #contents
|
||||||
|
|
||||||
|
/* Count the number of elements in an array. The array must be defined
|
||||||
|
* as such; using this with a dynamically allocated array will give
|
||||||
|
* incorrect results.
|
||||||
|
*/
|
||||||
|
#define G_N_ELEMENTS(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||||
|
|
||||||
/* Define G_VA_COPY() to do the right thing for copying va_list variables.
|
/* Define G_VA_COPY() to do the right thing for copying va_list variables.
|
||||||
* glibconfig.h may have already defined G_VA_COPY as va_copy or __va_copy.
|
* glibconfig.h may have already defined G_VA_COPY as va_copy or __va_copy.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user