ObjFW  Diff

Differences From Artifact [8c93de1488]:

To Artifact [93b6de8609]:


627
628
629
630
631
632
633
634

635
636
637
638
639
640
641
627
628
629
630
631
632
633

634
635
636
637
638
639
640
641







-
+








	objc_global_mutex_lock();

	if ((ret = malloc((classesCount + 1) * sizeof(Class))) == NULL)
		OBJC_ERROR("Failed to allocate memory for class list!");

	count = objc_getClassList(ret, classesCount);
	OF_ENSURE(count == classesCount);
	OFEnsure(count == classesCount);

	ret[count] = Nil;

	if (length != NULL)
		*length = count;

	objc_global_mutex_unlock();
972
973
974
975
976
977
978
979

980
981
982
983
984
985
986
987
988
989
990
991
972
973
974
975
976
977
978

979
980
981
982
983
984
985
986
987
988
989
990
991







-
+












			 * UINT32_MAX so that it will get increased at the end
			 * of the loop and thus become 0.
			 */
			i = UINT32_MAX;
		}
	}

	OF_ENSURE(classesCount == 0);
	OFEnsure(classesCount == 0);

	if (emptyDTable != NULL) {
		objc_dtable_free(emptyDTable);
		emptyDTable = NULL;
	}

	objc_sparsearray_free(fastPath);
	fastPath = NULL;

	objc_hashtable_free(classes);
	classes = NULL;
}