Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ab589b9

Browse files
committed
Completely disable the declarations for malloc() and friends. Use
#ifdef though, so if you still need these for a really backwards compiler you know what to do.
1 parent 0078aaf commit ab589b9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Include/mymalloc.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,13 @@ extern "C" {
6767
#pragma lib_export on
6868
#endif
6969

70-
#ifndef HAVE_STDLIB_H
70+
/* The following should never be necessary */
71+
#ifdef NEED_TO_DECLARE_MALLOC_AND_FRIEND
7172
extern ANY *malloc Py_PROTO((size_t));
7273
extern ANY *calloc Py_PROTO((size_t, size_t));
7374
extern ANY *realloc Py_PROTO((ANY *, size_t));
7475
extern void free Py_PROTO((ANY *)); /* XXX sometimes int on Unix old systems */
75-
#endif /* !HAVE_STDLIB */
76+
#endif
7677

7778
#ifndef NULL
7879
#define NULL ((ANY *)0)

0 commit comments

Comments
 (0)