mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 17:12:03 +00:00
GC was deprecated several releases ago and notinally removed a couple of releases ago ... delete more remnants of the old code.
This commit is contained in:
parent
a1514249f3
commit
52c127c950
15 changed files with 20 additions and 126 deletions
|
@ -31,10 +31,8 @@
|
|||
|
||||
#if defined(OBJC_CAP_ARC)
|
||||
# include <objc/objc-arc.h>
|
||||
# define ARC_WEAK_READ(x) objc_loadWeak((id*)x)
|
||||
# define ARC_WEAK_WRITE(addr, x) objc_storeWeak((id*)addr, (id)x)
|
||||
# define WEAK_READ(x) (*x)
|
||||
# define WEAK_WRITE(addr, x) (*(addr) = x)
|
||||
# define WEAK_READ(x) objc_loadWeak((id*)x)
|
||||
# define WEAK_WRITE(addr, x) objc_storeWeak((id*)addr, (id)x)
|
||||
# define STRONG_WRITE(addr, x) objc_storeStrong((id*)addr, (id)x)
|
||||
# define STRONG_ACQUIRE(x) objc_retain(x)
|
||||
#else
|
||||
|
@ -43,12 +41,6 @@
|
|||
# define STRONG_WRITE(addr, x) ASSIGN(*((id*)addr), ((id)x))
|
||||
# define STRONG_ACQUIRE(x) RETAIN(((id)x))
|
||||
#endif
|
||||
#ifndef ARC_WEAK_WRITE
|
||||
# define ARC_WEAK_WRITE(addr, x) WEAK_WRITE(addr, x)
|
||||
#endif
|
||||
#ifndef ARC_WEAK_READ
|
||||
# define ARC_WEAK_READ(x) WEAK_READ(x)
|
||||
#endif
|
||||
|
||||
|
||||
/* Declare a structure type to copy pointer functions information
|
||||
|
@ -106,10 +98,6 @@ inline static BOOL personalityType(int options, int flag)
|
|||
static inline void *pointerFunctionsRead(PFInfo *PF, void **addr)
|
||||
{
|
||||
if (memoryType(PF->options, NSPointerFunctionsWeakMemory))
|
||||
{
|
||||
return ARC_WEAK_READ((id*)addr);
|
||||
}
|
||||
if (memoryType(PF->options, NSPointerFunctionsZeroingWeakMemory))
|
||||
{
|
||||
return WEAK_READ((id*)addr);
|
||||
}
|
||||
|
@ -122,10 +110,6 @@ static inline void *pointerFunctionsRead(PFInfo *PF, void **addr)
|
|||
static inline void pointerFunctionsAssign(PFInfo *PF, void **addr, void *value)
|
||||
{
|
||||
if (memoryType(PF->options, NSPointerFunctionsWeakMemory))
|
||||
{
|
||||
ARC_WEAK_WRITE(addr, value);
|
||||
}
|
||||
else if (memoryType(PF->options, NSPointerFunctionsZeroingWeakMemory))
|
||||
{
|
||||
WEAK_WRITE(addr, value);
|
||||
}
|
||||
|
@ -203,9 +187,7 @@ pointerFunctionsRelinquish(PFInfo *PF, void **itemptr)
|
|||
if (PF->relinquishFunction != 0)
|
||||
(*PF->relinquishFunction)(*itemptr, PF->sizeFunction);
|
||||
if (memoryType(PF->options, NSPointerFunctionsWeakMemory))
|
||||
ARC_WEAK_WRITE(itemptr, 0);
|
||||
else if (memoryType(PF->options, NSPointerFunctionsZeroingWeakMemory))
|
||||
WEAK_WRITE(itemptr, (void*)0);
|
||||
WEAK_WRITE(itemptr, 0);
|
||||
else
|
||||
*itemptr = 0;
|
||||
}
|
||||
|
@ -222,9 +204,7 @@ pointerFunctionsReplace(PFInfo *PF, void **dst, void *src)
|
|||
if (PF->relinquishFunction != 0)
|
||||
(*PF->relinquishFunction)(*dst, PF->sizeFunction);
|
||||
if (memoryType(PF->options, NSPointerFunctionsWeakMemory))
|
||||
ARC_WEAK_WRITE(dst, 0);
|
||||
else if (memoryType(PF->options, NSPointerFunctionsZeroingWeakMemory))
|
||||
WEAK_WRITE(dst, (void*)0);
|
||||
WEAK_WRITE(dst, 0);
|
||||
else
|
||||
*dst = src;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue