ObjFW  Diff

Differences From 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]

To Artifact [39e51eca73]:


34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

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







|

|



|

|







34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

static struct objc_hashtable *hashtable;
#ifdef OF_HAVE_THREADS
static of_spinlock_t spinlock;
#endif

static uint32_t
hash(const void *object)
{
	return (uint32_t)(uintptr_t)object;
}

static bool
equal(const void *object1, const void *object2)
{
	return (object1 == object2);
}

OF_CONSTRUCTOR()
{
	hashtable = objc_hashtable_new(hash, equal, 2);

#ifdef OF_HAVE_THREADS