mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
cleanup for next reelease
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32385 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ed9082d7b0
commit
7a55300d6b
4 changed files with 21 additions and 13 deletions
|
@ -1,3 +1,11 @@
|
|||
2011-02-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/ObjectiveC2/runtime.c:
|
||||
* Headers/Additions/GNUstepBase/preface.h.in:
|
||||
* Headers/Additions/GNUstepBase/GSObjCRuntime.h:
|
||||
Remove last vestiges of runtime specific memory allocation apart from
|
||||
obsolete macros (marked as deprecated).
|
||||
|
||||
2011-02-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSDecimal.m:
|
||||
|
|
|
@ -502,7 +502,7 @@ GSLastErrorStr(long error_id) GS_DEPRECATED_FUNC;
|
|||
if (__count > __max) \
|
||||
{ \
|
||||
unsigned int __tmp; \
|
||||
__objects = (id*)objc_malloc(__count*sizeof(id)); \
|
||||
__objects = (id*)malloc(__count*sizeof(id)); \
|
||||
__pairs = &__objects[__count/2]; \
|
||||
__objects[0] = firstObject; \
|
||||
va_start(__ap, firstObject); \
|
||||
|
@ -520,7 +520,7 @@ GSLastErrorStr(long error_id) GS_DEPRECATED_FUNC;
|
|||
va_end(__ap); \
|
||||
} \
|
||||
code; \
|
||||
if (__objects != __buf) objc_free(__objects); \
|
||||
if (__objects != __buf) free(__objects); \
|
||||
})
|
||||
|
||||
/**
|
||||
|
|
|
@ -148,16 +148,16 @@
|
|||
#define GNUSTEP_BASE_GCC_VERSION @GCC_VERSION@
|
||||
|
||||
#define OBJC_MALLOC(VAR, TYPE, NUM) \
|
||||
((VAR) = (TYPE *) objc_malloc ((unsigned)(NUM)*sizeof(TYPE)))
|
||||
(fprintf(stderr, "OBJC_MALLOC is deprecated"),(VAR) = (TYPE *) malloc ((unsigned)(NUM)*sizeof(TYPE)))
|
||||
#define OBJC_VALLOC(VAR, TYPE, NUM) \
|
||||
((VAR) = (TYPE *) objc_valloc ((unsigned)(NUM)*sizeof(TYPE)))
|
||||
(fprintf(stderr, "OBJC_VALLOC is deprecated"),(VAR) = (TYPE *) valloc ((unsigned)(NUM)*sizeof(TYPE)))
|
||||
#define OBJC_ATOMIC_MALLOC(VAR, TYPE, NUM) \
|
||||
((VAR) = (TYPE *) objc_atomic_malloc ((unsigned)(NUM)*sizeof(TYPE)))
|
||||
(fprintf(stderr, "OBJC_ATOMIC_MALLOC is deprecated"),(VAR) = (TYPE *) malloc ((unsigned)(NUM)*sizeof(TYPE)))
|
||||
#define OBJC_REALLOC(VAR, TYPE, NUM) \
|
||||
((VAR) = (TYPE *) objc_realloc ((VAR), (unsigned)(NUM)*sizeof(TYPE)))
|
||||
(fprintf(stderr, "OBJC_REALLOC is deprecated"),(VAR) = (TYPE *) 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)
|
||||
(fprintf(stderr, "OBJC_CALLOC is deprecated"),(VAR) = (TYPE *) calloc ((unsigned)(NUM), sizeof(TYPE)))
|
||||
#define OBJC_FREE(PTR) (fprintf(stderr, "OBJC_FREE is deprecated"), free (PTR))
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a,b) \
|
||||
|
|
|
@ -165,14 +165,14 @@ class_addIvar(Class cls, const char *name,
|
|||
|
||||
if (NULL == ivarlist)
|
||||
{
|
||||
cls->ivars = objc_malloc(sizeof(struct objc_ivar_list));
|
||||
cls->ivars = malloc(sizeof(struct objc_ivar_list));
|
||||
cls->ivars->ivar_count = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ivarlist->ivar_count++;
|
||||
// objc_ivar_list contains one ivar. Others follow it.
|
||||
cls->ivars = objc_realloc(ivarlist, sizeof(struct objc_ivar_list)
|
||||
cls->ivars = realloc(ivarlist, sizeof(struct objc_ivar_list)
|
||||
+ (ivarlist->ivar_count -
|
||||
1) * sizeof(struct objc_ivar));
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ class_addMethod(Class cls, SEL name, IMP imp, const char *types)
|
|||
}
|
||||
}
|
||||
|
||||
methods = objc_malloc(sizeof(struct objc_method_list));
|
||||
methods = malloc(sizeof(struct objc_method_list));
|
||||
methods->method_next = cls->methods;
|
||||
cls->methods = methods;
|
||||
|
||||
|
@ -240,7 +240,7 @@ class_addProtocol(Class cls, Protocol * protocol)
|
|||
return NO;
|
||||
}
|
||||
protocols = cls->protocols;
|
||||
protocols = objc_malloc(sizeof(struct objc_protocol_list));
|
||||
protocols = malloc(sizeof(struct objc_protocol_list));
|
||||
if (protocols == NULL)
|
||||
{
|
||||
return NO;
|
||||
|
@ -356,7 +356,7 @@ class_copyProtocolList(Class cls, unsigned int *outCount)
|
|||
id
|
||||
class_createInstance(Class cls, size_t extraBytes)
|
||||
{
|
||||
id obj = objc_malloc(cls->instance_size + extraBytes);
|
||||
id obj = malloc(cls->instance_size + extraBytes);
|
||||
obj->isa = cls;
|
||||
return obj;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue