Commit df7fbc8c by Richard Kenner

Replace use of __objc_xcalloc, __objc_xrealloc, and __objc_xmalloc

with objc_calloc, objc_realloc, and objc_malloc.

From-SVN: r12767
parent 2dac9ca6
...@@ -304,14 +304,14 @@ __sel_register_typed_name (const char *name, const char *types, ...@@ -304,14 +304,14 @@ __sel_register_typed_name (const char *name, const char *types,
if (orig) if (orig)
j = orig; j = orig;
else else
j = __objc_xmalloc (sizeof (struct objc_selector)); j = objc_malloc (sizeof (struct objc_selector));
j->sel_id = (void*)i; j->sel_id = (void*)i;
/* Can we use the pointer or must copy types? Don't copy if NULL */ /* Can we use the pointer or must copy types? Don't copy if NULL */
if ((is_const) || (types == 0)) if ((is_const) || (types == 0))
j->sel_types = (const char*)types; j->sel_types = (const char*)types;
else { else {
j->sel_types = (char *)__objc_xmalloc(strlen(types)+1); j->sel_types = (char *) objc_malloc(strlen(types)+1);
strcpy(j->sel_types, types); strcpy(j->sel_types, types);
} }
l = (struct objc_list*)sarray_get (__objc_selector_array, i); l = (struct objc_list*)sarray_get (__objc_selector_array, i);
...@@ -323,14 +323,14 @@ __sel_register_typed_name (const char *name, const char *types, ...@@ -323,14 +323,14 @@ __sel_register_typed_name (const char *name, const char *types,
if (orig) if (orig)
j = orig; j = orig;
else else
j = __objc_xmalloc (sizeof (struct objc_selector)); j = objc_malloc (sizeof (struct objc_selector));
j->sel_id = (void*)i; j->sel_id = (void*)i;
/* Can we use the pointer or must copy types? Don't copy if NULL */ /* Can we use the pointer or must copy types? Don't copy if NULL */
if ((is_const) || (types == 0)) if ((is_const) || (types == 0))
j->sel_types = (const char*)types; j->sel_types = (const char*)types;
else { else {
j->sel_types = (char *)__objc_xmalloc(strlen(types)+1); j->sel_types = (char *) objc_malloc(strlen(types)+1);
strcpy(j->sel_types, types); strcpy(j->sel_types, types);
} }
l = 0; l = 0;
...@@ -347,7 +347,7 @@ __sel_register_typed_name (const char *name, const char *types, ...@@ -347,7 +347,7 @@ __sel_register_typed_name (const char *name, const char *types,
if ((is_const) || (name == 0)) if ((is_const) || (name == 0))
new_name = name; new_name = name;
else { else {
new_name = (char *)__objc_xmalloc(strlen(name)+1); new_name = (char *) objc_malloc(strlen(name)+1);
strcpy(new_name, name); strcpy(new_name, name);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment