ObjFW  Check-in [39e23d6363]

Overview
Comment:runtime: Fix objc_getClassList not unlocking mutex
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 39e23d636397cc50970ad50eab6411b2acdb685750629c44371e5b562eded0d4
User & Date: js on 2024-02-24 19:42:54
Other Links: manifest | tags
Context
2024-02-24
20:50
Add endbr32 / endbr64 check-in: 75d88e0f6e user: js tags: trunk
19:43
runtime: Fix objc_getClassList not unlocking mutex check-in: 7a33596a17 user: js tags: 1.0
19:42
runtime: Fix objc_getClassList not unlocking mutex check-in: 39e23d6363 user: js tags: trunk
19:40
Make everything work on macOS Leopard again check-in: c3e83facc5 user: js tags: trunk
Changes

Modified src/runtime/class.m from [628f2b08c1] to [6da45bb3d8].

584
585
586
587
588
589
590
591




592

593
594
595
596
597
598
599

unsigned int
objc_getClassList(Class *buffer, unsigned int count)
{
	unsigned int j;
	objc_globalMutex_lock();

	if (buffer == NULL)




		return classesCount;


	if (classesCount < count)
		count = classesCount;

	j = 0;
	for (uint32_t i = 0; i < classes->size; i++) {
		void *class;







|
>
>
>
>
|
>







584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604

unsigned int
objc_getClassList(Class *buffer, unsigned int count)
{
	unsigned int j;
	objc_globalMutex_lock();

	if (buffer == NULL) {
		count = classesCount;

		objc_globalMutex_unlock();

		return count;
	}

	if (classesCount < count)
		count = classesCount;

	j = 0;
	for (uint32_t i = 0; i < classes->size; i++) {
		void *class;