mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 14:36:16 +01:00
define NULL as (0L) if __cplusplus is defined, to avoid "ANSI C++ forbids
Wed Sep 22 01:53:18 1999 Tim Janik <timj@gtk.org> * glib.h (NULL): define NULL as (0L) if __cplusplus is defined, to avoid "ANSI C++ forbids implicit conversion from `void *' in argument passing" errors upon NULL usage in C++ programs (gcc-2.95 is on crack for erroring out on this, instead of just issueing a warning). * glib.h (g_trash_stack_pop): use uncasted NULL again.
This commit is contained in:
parent
ddfc68fc98
commit
4944d4df46
@ -1,3 +1,12 @@
|
||||
Wed Sep 22 01:53:18 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.h (NULL): define NULL as (0L) if __cplusplus is defined, to
|
||||
avoid "ANSI C++ forbids implicit conversion from `void *' in argument
|
||||
passing" errors upon NULL usage in C++ programs (gcc-2.95 is on crack
|
||||
for erroring out on this, instead of just issueing a warning).
|
||||
|
||||
* glib.h (g_trash_stack_pop): use uncasted NULL again.
|
||||
|
||||
Fri Sep 17 10:24:45 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmem.c (g_mem_chunk_compute_size) (g_mem_chunk_new): applied patch
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Sep 22 01:53:18 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.h (NULL): define NULL as (0L) if __cplusplus is defined, to
|
||||
avoid "ANSI C++ forbids implicit conversion from `void *' in argument
|
||||
passing" errors upon NULL usage in C++ programs (gcc-2.95 is on crack
|
||||
for erroring out on this, instead of just issueing a warning).
|
||||
|
||||
* glib.h (g_trash_stack_pop): use uncasted NULL again.
|
||||
|
||||
Fri Sep 17 10:24:45 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmem.c (g_mem_chunk_compute_size) (g_mem_chunk_new): applied patch
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Sep 22 01:53:18 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.h (NULL): define NULL as (0L) if __cplusplus is defined, to
|
||||
avoid "ANSI C++ forbids implicit conversion from `void *' in argument
|
||||
passing" errors upon NULL usage in C++ programs (gcc-2.95 is on crack
|
||||
for erroring out on this, instead of just issueing a warning).
|
||||
|
||||
* glib.h (g_trash_stack_pop): use uncasted NULL again.
|
||||
|
||||
Fri Sep 17 10:24:45 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmem.c (g_mem_chunk_compute_size) (g_mem_chunk_new): applied patch
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Sep 22 01:53:18 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.h (NULL): define NULL as (0L) if __cplusplus is defined, to
|
||||
avoid "ANSI C++ forbids implicit conversion from `void *' in argument
|
||||
passing" errors upon NULL usage in C++ programs (gcc-2.95 is on crack
|
||||
for erroring out on this, instead of just issueing a warning).
|
||||
|
||||
* glib.h (g_trash_stack_pop): use uncasted NULL again.
|
||||
|
||||
Fri Sep 17 10:24:45 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmem.c (g_mem_chunk_compute_size) (g_mem_chunk_new): applied patch
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Sep 22 01:53:18 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.h (NULL): define NULL as (0L) if __cplusplus is defined, to
|
||||
avoid "ANSI C++ forbids implicit conversion from `void *' in argument
|
||||
passing" errors upon NULL usage in C++ programs (gcc-2.95 is on crack
|
||||
for erroring out on this, instead of just issueing a warning).
|
||||
|
||||
* glib.h (g_trash_stack_pop): use uncasted NULL again.
|
||||
|
||||
Fri Sep 17 10:24:45 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmem.c (g_mem_chunk_compute_size) (g_mem_chunk_new): applied patch
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Sep 22 01:53:18 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.h (NULL): define NULL as (0L) if __cplusplus is defined, to
|
||||
avoid "ANSI C++ forbids implicit conversion from `void *' in argument
|
||||
passing" errors upon NULL usage in C++ programs (gcc-2.95 is on crack
|
||||
for erroring out on this, instead of just issueing a warning).
|
||||
|
||||
* glib.h (g_trash_stack_pop): use uncasted NULL again.
|
||||
|
||||
Fri Sep 17 10:24:45 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmem.c (g_mem_chunk_compute_size) (g_mem_chunk_new): applied patch
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Sep 22 01:53:18 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.h (NULL): define NULL as (0L) if __cplusplus is defined, to
|
||||
avoid "ANSI C++ forbids implicit conversion from `void *' in argument
|
||||
passing" errors upon NULL usage in C++ programs (gcc-2.95 is on crack
|
||||
for erroring out on this, instead of just issueing a warning).
|
||||
|
||||
* glib.h (g_trash_stack_pop): use uncasted NULL again.
|
||||
|
||||
Fri Sep 17 10:24:45 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmem.c (g_mem_chunk_compute_size) (g_mem_chunk_new): applied patch
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Sep 22 01:53:18 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib.h (NULL): define NULL as (0L) if __cplusplus is defined, to
|
||||
avoid "ANSI C++ forbids implicit conversion from `void *' in argument
|
||||
passing" errors upon NULL usage in C++ programs (gcc-2.95 is on crack
|
||||
for erroring out on this, instead of just issueing a warning).
|
||||
|
||||
* glib.h (g_trash_stack_pop): use uncasted NULL again.
|
||||
|
||||
Fri Sep 17 10:24:45 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmem.c (g_mem_chunk_compute_size) (g_mem_chunk_new): applied patch
|
||||
|
8
glib.h
8
glib.h
@ -104,7 +104,11 @@ extern "C" {
|
||||
* defined then the current definition is correct.
|
||||
*/
|
||||
#ifndef NULL
|
||||
#define NULL ((void*) 0)
|
||||
# ifdef __cplusplus
|
||||
# define NULL (0L)
|
||||
# else /* !__cplusplus */
|
||||
# define NULL ((void*) 0)
|
||||
# endif /* !__cplusplus */
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
@ -1690,7 +1694,7 @@ g_trash_stack_pop (GTrashStack **stack_p)
|
||||
/* NULLify private pointer here, most platforms store NULL as
|
||||
* subsequent 0 bytes
|
||||
*/
|
||||
data->next = (GTrashStack*) NULL;
|
||||
data->next = NULL;
|
||||
}
|
||||
|
||||
return data;
|
||||
|
@ -104,7 +104,11 @@ extern "C" {
|
||||
* defined then the current definition is correct.
|
||||
*/
|
||||
#ifndef NULL
|
||||
#define NULL ((void*) 0)
|
||||
# ifdef __cplusplus
|
||||
# define NULL (0L)
|
||||
# else /* !__cplusplus */
|
||||
# define NULL ((void*) 0)
|
||||
# endif /* !__cplusplus */
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
@ -1690,7 +1694,7 @@ g_trash_stack_pop (GTrashStack **stack_p)
|
||||
/* NULLify private pointer here, most platforms store NULL as
|
||||
* subsequent 0 bytes
|
||||
*/
|
||||
data->next = (GTrashStack*) NULL;
|
||||
data->next = NULL;
|
||||
}
|
||||
|
||||
return data;
|
||||
|
Loading…
Reference in New Issue
Block a user