Differences From Artifact [979b29ef70]:
- File src/runtime/arc.m — part of check-in [0509d7a844] at 2019-01-03 19:13:03 on branch trunk — Update copyright (user: js, size: 5572) [annotate] [blame] [check-ins using]
To Artifact [7827e43c55]:
- File
src/runtime/arc.m
— part of check-in
[ef6d69931e]
at
2019-02-07 00:46:41
on branch trunk
— Make style consistent between ObjFW and ObjFW_RT
ObjFW_RT used to be a separate project that followed the BSD style, as
it was written in pure C, while ObjFW's style is based on the BSD style
with changes to make it a better fit for Objective-C. This commit
changes ObjFW_RT to use the same style as ObjFW. (user: js, size: 5556) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
34 35 36 37 38 39 40 | static struct objc_hashtable *hashtable; #ifdef OF_HAVE_THREADS static of_spinlock_t spinlock; #endif static uint32_t | | | | | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | static struct objc_hashtable *hashtable; #ifdef OF_HAVE_THREADS static of_spinlock_t spinlock; #endif static uint32_t hash(const void *obj) { return (uint32_t)(uintptr_t)obj; } static bool equal(const void *obj1, const void *obj2) { return (obj1 == obj2); } OF_CONSTRUCTOR() { hashtable = objc_hashtable_new(hash, equal, 2); #ifdef OF_HAVE_THREADS if (!of_spinlock_new(&spinlock)) OBJC_ERROR("Failed to create spinlock!") #endif } |
︙ | ︙ |