mirror of git://gcc.gnu.org/git/gcc.git
Fixed critical typo in Objective-C runtime garbage collection code
From-SVN: r170561
This commit is contained in:
parent
544a301ed4
commit
55b21c7a64
|
@ -1,3 +1,9 @@
|
||||||
|
2011-02-28 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
PR libobjc/47922
|
||||||
|
* gc.c (class_ivar_set_gcinvisible): Use _C_GCINVISIBLE instead of
|
||||||
|
a hardcoded "!".
|
||||||
|
|
||||||
2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||||
|
|
||||||
* configure: Regenerate.
|
* configure: Regenerate.
|
||||||
|
|
10
libobjc/gc.c
10
libobjc/gc.c
|
@ -422,11 +422,15 @@ class_ivar_set_gcinvisible (Class class, const char *ivarname,
|
||||||
|
|
||||||
/* The variable is gc visible so we make it gc_invisible. */
|
/* The variable is gc visible so we make it gc_invisible. */
|
||||||
new_type = objc_malloc (strlen(ivar->ivar_type) + 2);
|
new_type = objc_malloc (strlen(ivar->ivar_type) + 2);
|
||||||
|
|
||||||
|
/* Copy the variable name. */
|
||||||
len = (type - ivar->ivar_type);
|
len = (type - ivar->ivar_type);
|
||||||
memcpy (new_type, ivar->ivar_type, len);
|
memcpy (new_type, ivar->ivar_type, len);
|
||||||
new_type[len] = 0;
|
/* Add '!'. */
|
||||||
strcat (new_type, "!");
|
new_type[len++] = _C_GCINVISIBLE;
|
||||||
strcat (new_type, type);
|
/* Copy the original types. */
|
||||||
|
strcpy (new_type + len, type);
|
||||||
|
|
||||||
ivar->ivar_type = new_type;
|
ivar->ivar_type = new_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue