mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
(OBJC_MALLOC): Macro moved here from src/include/objc-malloc.h.
(OBJC_VALLOC): Likewise. (OBJC_ATOMIC_MALLOC): Likewise. (OBJC_REALLOC): Likewise. (OBJC_CALLOC): Likewise. (OBJC_FREE): Likewise. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1730 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
de748f5045
commit
c2456276bb
1 changed files with 12 additions and 0 deletions
|
@ -78,6 +78,18 @@ extern const char o_NeXT_cc_version[];
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#define OBJC_MALLOC(VAR, TYPE, NUM) \
|
||||
((VAR) = (TYPE *) objc_malloc ((unsigned)(NUM)*sizeof(TYPE)))
|
||||
#define OBJC_VALLOC(VAR, TYPE, NUM) \
|
||||
((VAR) = (TYPE *) objc_valloc ((unsigned)(NUM)*sizeof(TYPE)))
|
||||
#define OBJC_ATOMIC_MALLOC(VAR, TYPE, NUM) \
|
||||
((VAR) = (TYPE *) objc_atomic_malloc ((unsigned)(NUM)*sizeof(TYPE)))
|
||||
#define OBJC_REALLOC(VAR, TYPE, NUM) \
|
||||
((VAR) = (TYPE *) objc_realloc ((VAR), (unsigned)(NUM)*sizeof(TYPE)))
|
||||
#define OBJC_CALLOC(VAR, TYPE, NUM) \
|
||||
((VAR) = (TYPE *) objc_calloc ((unsigned)(NUM), sizeof(TYPE)))
|
||||
#define OBJC_FREE(PTR) (*objc_free)((PTR))
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a,b) \
|
||||
({typedef _ta = (a), _tb = (b); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue