Differences From Artifact [297c42eb6a]:
- File src/runtime/static-instances.m — part of check-in [4c72b5544f] at 2018-04-29 20:27:23 on branch trunk — runtime: Add glue functions for Amiga library (user: js, size: 2685) [annotate] [blame] [check-ins using]
To Artifact [88afa289a1]:
- File
src/runtime/static-instances.m
— part of check-in
[0f42b0eafd]
at
2018-01-21 22:16:23
on branch trunk
— Allow building the runtime as a .framework
This also renames ObjFW-RT to ObjFW_RT, as hyphens should not be in
framework names. (user: js, size: 2657) [annotate] [blame] [check-ins using] [more...]
| ︙ | ︙ | |||
29 30 31 32 33 34 35 |
void
objc_init_static_instances(struct objc_abi_symtab *symtab)
{
struct objc_abi_static_instances **si;
/* Check if the class for a static instance became available */
for (size_t i = 0; i < static_instances_cnt; i++) {
| < | | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
void
objc_init_static_instances(struct objc_abi_symtab *symtab)
{
struct objc_abi_static_instances **si;
/* Check if the class for a static instance became available */
for (size_t i = 0; i < static_instances_cnt; i++) {
Class cls = objc_lookUpClass(static_instances[i]->class_name);
if (cls != Nil) {
for (id *instances = static_instances[i]->instances;
*instances != nil; instances++)
object_setClass(*instances, cls);
static_instances_cnt--;
|
| ︙ | ︙ | |||
71 72 73 74 75 76 77 |
si = (struct objc_abi_static_instances **)
symtab->defs[symtab->cls_def_cnt + symtab->cat_def_cnt];
if (si == NULL)
return;
for (; *si != NULL; si++) {
| | | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
si = (struct objc_abi_static_instances **)
symtab->defs[symtab->cls_def_cnt + symtab->cat_def_cnt];
if (si == NULL)
return;
for (; *si != NULL; si++) {
Class cls = objc_lookUpClass((*si)->class_name);
if (cls != Nil) {
for (id *instances = (*si)->instances;
*instances != nil; instances++)
object_setClass(*instances, cls);
} else {
static_instances = realloc(static_instances,
|
| ︙ | ︙ |