ObjFW  Diff

Differences From Artifact [d939f47c4b]:

To Artifact [e7600b0d22]:


65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
			ERROR("Not enough memory for category %s of class %s!",
			    cat->category_name, cat->class_name);

		ncats[i] = cat;
		ncats[i + 1] = NULL;
		objc_hashtable_set(categories, cat->class_name, ncats);

		if (cls != Nil && cls->info & OBJC_CLASS_INFO_INITIALIZED) {
			objc_update_dtable(cls);
			objc_update_dtable(cls->isa);
		}

		return;
	}

	if ((cats = malloc(2 * sizeof(struct objc_abi_category*))) == NULL)
		ERROR("Not enough memory for category %s of class %s!\n",
		    cat->category_name, cat->class_name);

	cats[0] = cat;
	cats[1] = NULL;
	objc_hashtable_set(categories, cat->class_name, cats);

	if (cls != Nil && cls->info & OBJC_CLASS_INFO_INITIALIZED) {
		objc_update_dtable(cls);
		objc_update_dtable(cls->isa);
	}
}

void
objc_register_all_categories(struct objc_abi_symtab *symtab)







|















|







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
			ERROR("Not enough memory for category %s of class %s!",
			    cat->category_name, cat->class_name);

		ncats[i] = cat;
		ncats[i + 1] = NULL;
		objc_hashtable_set(categories, cat->class_name, ncats);

		if (cls != Nil && cls->info & OBJC_CLASS_INFO_SETUP) {
			objc_update_dtable(cls);
			objc_update_dtable(cls->isa);
		}

		return;
	}

	if ((cats = malloc(2 * sizeof(struct objc_abi_category*))) == NULL)
		ERROR("Not enough memory for category %s of class %s!\n",
		    cat->category_name, cat->class_name);

	cats[0] = cat;
	cats[1] = NULL;
	objc_hashtable_set(categories, cat->class_name, cats);

	if (cls != Nil && cls->info & OBJC_CLASS_INFO_SETUP) {
		objc_update_dtable(cls);
		objc_update_dtable(cls->isa);
	}
}

void
objc_register_all_categories(struct objc_abi_symtab *symtab)