@@ -30,17 +30,17 @@ { for (struct objc_abi_method_list *ml = cat->instance_methods; ml != NULL; ml = ml->next) for (unsigned int i = 0; i < ml->count; i++) objc_register_selector( - (struct objc_abi_selector*)&ml->methods[i]); + (struct objc_abi_selector *)&ml->methods[i]); for (struct objc_abi_method_list *ml = cat->class_methods; ml != NULL; ml = ml->next) for (unsigned int i = 0; i < ml->count; i++) objc_register_selector( - (struct objc_abi_selector*)&ml->methods[i]); + (struct objc_abi_selector *)&ml->methods[i]); } static void register_category(struct objc_abi_category *cat) { @@ -49,21 +49,21 @@ if (categories == NULL) categories = objc_hashtable_new( objc_hash_string, objc_equal_string, 2); - cats = (struct objc_abi_category**)objc_hashtable_get(categories, + cats = (struct objc_abi_category **)objc_hashtable_get(categories, cat->class_name); if (cats != NULL) { struct objc_abi_category **ncats; size_t i; for (i = 0; cats[i] != NULL; i++); if ((ncats = realloc(cats, - (i + 2) * sizeof(struct objc_abi_category*))) == NULL) + (i + 2) * sizeof(struct objc_abi_category *))) == NULL) OBJC_ERROR("Not enough memory for category %s of " "class %s!", cat->category_name, cat->class_name); ncats[i] = cat; ncats[i + 1] = NULL; @@ -75,11 +75,11 @@ } return; } - if ((cats = malloc(2 * sizeof(struct objc_abi_category*))) == NULL) + if ((cats = malloc(2 * sizeof(struct objc_abi_category *))) == NULL) OBJC_ERROR("Not enough memory for category %s of class %s!\n", cat->category_name, cat->class_name); cats[0] = cat; cats[1] = NULL; @@ -93,25 +93,25 @@ void objc_register_all_categories(struct objc_abi_symtab *symtab) { struct objc_abi_category **cats = - (struct objc_abi_category**)symtab->defs + symtab->cls_def_cnt; + (struct objc_abi_category **)symtab->defs + symtab->cls_def_cnt; for (size_t i = 0; i < symtab->cat_def_cnt; i++) { register_selectors(cats[i]); register_category(cats[i]); } } -struct objc_category** +struct objc_category ** objc_categories_for_class(Class cls) { if (categories == NULL) return NULL; - return (struct objc_category**)objc_hashtable_get(categories, + return (struct objc_category **)objc_hashtable_get(categories, cls->name); } void objc_unregister_all_categories(void) @@ -119,10 +119,10 @@ if (categories == NULL) return; for (uint32_t i = 0; i < categories->size; i++) if (categories->data[i] != NULL) - free((void*)categories->data[i]->obj); + free((void *)categories->data[i]->obj); objc_hashtable_free(categories); categories = NULL; }