ObjFW  Check-in [41c2b305ce]

Overview
Comment:Fix missing void in function declarations
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 41c2b305cec18fc2acc080b3b8a91257ffd7e7bc58698c14cba5e5498b933560
User & Date: js on 2022-09-19 19:10:53
Other Links: manifest | tags
Context
2022-09-19
19:16
OFObject: Free spinlock in dealloc check-in: 8aa77abadd user: js tags: trunk
19:10
Fix missing void in function declarations check-in: 41c2b305ce user: js tags: trunk
2022-09-16
13:17
OFINIFile: Default to UTF-8 check-in: 2140e81b53 user: js tags: trunk
Changes

Modified src/OFSocket.m from [6267eed94e] to [65b91d8086].

230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# endif
	if (socketBase != NULL)
		CloseLibrary(socketBase);
}
#endif

int
OFSocketErrNo()
{
#if defined(OF_WINDOWS)
	switch (WSAGetLastError()) {
	case WSAEACCES:
		return EACCES;
	case WSAEADDRINUSE:
		return EADDRINUSE;







|







230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# endif
	if (socketBase != NULL)
		CloseLibrary(socketBase);
}
#endif

int
OFSocketErrNo(void)
{
#if defined(OF_WINDOWS)
	switch (WSAGetLastError()) {
	case WSAEACCES:
		return EACCES;
	case WSAEADDRINUSE:
		return EADDRINUSE;

Modified src/runtime/amiga-library.m from [d177a01899] to [0f1cc9582a].

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# define OBJC_M68K_REG(reg) __asm__(#reg)
#else
# define OBJC_M68K_REG(reg)
#endif

/* This always needs to be the first thing in the file. */
int
_start()
{
	return -1;
}

#ifdef OF_AMIGAOS_M68K
void
__init_eh(void)







|







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# define OBJC_M68K_REG(reg) __asm__(#reg)
#else
# define OBJC_M68K_REG(reg)
#endif

/* This always needs to be the first thing in the file. */
int
_start(void)
{
	return -1;
}

#ifdef OF_AMIGAOS_M68K
void
__init_eh(void)

Modified src/runtime/autorelease.m from [44274c4d6f] to [a652114a4e].

59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
	if (OFTLSKeyNew(&objectsKey) != 0 || OFTLSKeyNew(&countKey) != 0 ||
	    OFTLSKeyNew(&sizeKey) != 0)
		OBJC_ERROR("Failed to create TLS keys!");
}
#endif

void *
objc_autoreleasePoolPush()
{
#if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS)
	uintptr_t count = (uintptr_t)OFTLSKeyGet(countKey);
#endif
	return (void *)count;
}








|







59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
	if (OFTLSKeyNew(&objectsKey) != 0 || OFTLSKeyNew(&countKey) != 0 ||
	    OFTLSKeyNew(&sizeKey) != 0)
		OBJC_ERROR("Failed to create TLS keys!");
}
#endif

void *
objc_autoreleasePoolPush(void)
{
#if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS)
	uintptr_t count = (uintptr_t)OFTLSKeyGet(countKey);
#endif
	return (void *)count;
}

Modified src/runtime/class.m from [8d4b7cca0f] to [bcbf47b312].

401
402
403
404
405
406
407
408
409
410
411
412
413
414
415

	initializeClass(class);

	objc_globalMutex_unlock();
}

static void
processLoadQueue()
{
	for (size_t i = 0; i < loadQueueCount; i++) {
		setUpClass(loadQueue[i]);

		if (loadQueue[i]->info & OBJC_CLASS_INFO_SETUP) {
			callLoad(loadQueue[i]);








|







401
402
403
404
405
406
407
408
409
410
411
412
413
414
415

	initializeClass(class);

	objc_globalMutex_unlock();
}

static void
processLoadQueue(void)
{
	for (size_t i = 0; i < loadQueueCount; i++) {
		setUpClass(loadQueue[i]);

		if (loadQueue[i]->info & OBJC_CLASS_INFO_SETUP) {
			callLoad(loadQueue[i]);

Modified src/runtime/static-instances.m from [a4b6846d46] to [7d72566e27].

91
92
93
94
95
96
97
98
99
100
101
102
103
			staticInstancesList[staticInstancesCount++] =
			    *staticInstances;
		}
	}
}

void
objc_forgetPendingStaticInstances()
{
	free(staticInstancesList);
	staticInstancesList = NULL;
	staticInstancesCount = 0;
}







|





91
92
93
94
95
96
97
98
99
100
101
102
103
			staticInstancesList[staticInstancesCount++] =
			    *staticInstances;
		}
	}
}

void
objc_forgetPendingStaticInstances(void)
{
	free(staticInstancesList);
	staticInstancesList = NULL;
	staticInstancesCount = 0;
}

Modified tests/objc_sync/test.m from [63dc58fd99] to [1f28b08c51].

41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
	printf("[%s] Left #1\n", name);

	return nil;
}
@end

int
main()
{
	MyThread *t1, *t2;

	lock = [[OFObject alloc] init];

	t1 = [MyThread thread];
	[t1 setName: @"A"];

	t2 = [MyThread thread];
	[t2 setName: @"B"];

	[t1 start];
	[t2 start];

	[t1 join];
	[t2 join];

	return 0;
}







|






|


|









41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
	printf("[%s] Left #1\n", name);

	return nil;
}
@end

int
main(void)
{
	MyThread *t1, *t2;

	lock = [[OFObject alloc] init];

	t1 = [MyThread thread];
	t1.name = @"A";

	t2 = [MyThread thread];
	t2.name = @"B";

	[t1 start];
	[t2 start];

	[t1 join];
	[t2 join];

	return 0;
}