Index: src/runtime/hashtable.m ================================================================== --- src/runtime/hashtable.m +++ src/runtime/hashtable.m @@ -173,19 +173,19 @@ } h->data[idx]->obj = obj; } -const void* +void* objc_hashtable_get(struct objc_hashtable *h, const char *key) { int64_t idx = index_for_key(h, key); if (idx < 0) return NULL; - return h->data[idx]->obj; + return (void*)h->data[idx]->obj; } void objc_hashtable_free(struct objc_hashtable *h) { Index: src/runtime/runtime-private.h ================================================================== --- src/runtime/runtime-private.h +++ src/runtime/runtime-private.h @@ -148,11 +148,11 @@ extern void objc_free_all_classes(void); extern uint32_t objc_hash_string(const char*); extern struct objc_hashtable* objc_hashtable_new(uint32_t); extern void objc_hashtable_set(struct objc_hashtable*, const char*, const void*); -extern const void* objc_hashtable_get(struct objc_hashtable*, const char*); +extern void* objc_hashtable_get(struct objc_hashtable*, const char*); extern void objc_hashtable_free(struct objc_hashtable *h); extern BOOL objc_hashtable_warn_on_collision; extern void objc_register_selector(struct objc_abi_selector*); extern void objc_register_all_selectors(struct objc_abi_symtab*); extern void objc_free_all_selectors(void); @@ -173,24 +173,24 @@ extern void objc_global_mutex_lock(void); extern void objc_global_mutex_unlock(void); extern void objc_global_mutex_free(void); extern void objc_free_when_singlethreaded(void*); -static inline const void* +static inline void* objc_sparsearray_get(const struct objc_sparsearray *s, uint32_t idx) { #ifndef OF_SELUID16 uint8_t i = idx >> 16; uint8_t j = idx >> 8; uint8_t k = idx; - return s->buckets[i]->buckets[j]->buckets[k]; + return (void*)s->buckets[i]->buckets[j]->buckets[k]; #else uint8_t i = idx >> 8; uint8_t j = idx; - return s->buckets[i]->buckets[j]; + return (void*)s->buckets[i]->buckets[j]; #endif } #define ERROR(...) \ { \