ObjFW  Diff

Differences From Artifact [0835c2a6e1]:

To Artifact [862b2e6a2f]:


40
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
extern struct Library *ObjFWBase;

#if OF_GCC_VERSION >= 1100
# pragma GCC diagnostic ignored "-Warray-parameter"
#endif

bool
OFInit(unsigned int version, struct OFLibC *_Nonnull libc)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((bool (*)(unsigned int __asm__("d0"), struct OFLibC *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWBase) - 30))(version, libc);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((bool (*)(unsigned int, struct OFLibC *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 28))(version, libc);
#endif
}

void *_Nullable
OFAllocMemory(size_t count, size_t size)
{
#if defined(OF_AMIGAOS_M68K)







|




|






|







40
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
extern struct Library *ObjFWBase;

#if OF_GCC_VERSION >= 1100
# pragma GCC diagnostic ignored "-Warray-parameter"
#endif

bool
OFInit(unsigned int version, struct OFLibC *_Nonnull libc, struct Library *_Nonnull RTBase)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((bool (*)(unsigned int __asm__("d0"), struct OFLibC *_Nonnull __asm__("a0"), struct Library *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWBase) - 30))(version, libc, RTBase);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((bool (*)(unsigned int, struct OFLibC *_Nonnull, struct Library *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 28))(version, libc, RTBase);
#endif
}

void *_Nullable
OFAllocMemory(size_t count, size_t size)
{
#if defined(OF_AMIGAOS_M68K)