+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>
* configure: Regenerate.
/* The variable is gc visible so we make it gc_invisible. */
new_type = objc_malloc (strlen(ivar->ivar_type) + 2);
+
+ /* Copy the variable name. */
len = (type - ivar->ivar_type);
memcpy (new_type, ivar->ivar_type, len);
- new_type[len] = 0;
- strcat (new_type, "!");
- strcat (new_type, type);
+ /* Add '!'. */
+ new_type[len++] = _C_GCINVISIBLE;
+ /* Copy the original types. */
+ strcpy (new_type + len, type);
+
ivar->ivar_type = new_type;
}