ObjFW  Check-in [cee78b6630]

Overview
Comment:Fix ObjC++ with GCC
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: cee78b6630366e315d952608763594653b9ea8c2b1fdbb89b0a5e9569a163ae2
User & Date: js on 2024-07-21 12:17:24
Other Links: manifest | tags
Context
2024-07-21
16:41
platform.h: Add LoongArch 64 check-in: 75e7375c66 user: js tags: trunk
12:18
Fix ObjC++ with GCC check-in: 60c6616ea4 user: js tags: 1.1
12:17
Fix ObjC++ with GCC check-in: cee78b6630 user: js tags: trunk
2024-07-06
10:50
Increase library versions check-in: 533c070dea user: js tags: trunk
Changes

Modified src/OFBlock.m from [e8eabc79e2] to [22b6fb4345].

128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
	0, NULL, 3, 0,
	{
		&_NSConcreteStackBlock, &_NSConcreteGlobalBlock,
		&_NSConcreteMallocBlock, NULL
	}
};

static struct objc_module module = {
	8, sizeof(module), NULL, (struct objc_symtab *)&symtab
};

OF_CONSTRUCTOR()
{
	__objc_exec_class(&module);
}







|







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
	0, NULL, 3, 0,
	{
		&_NSConcreteStackBlock, &_NSConcreteGlobalBlock,
		&_NSConcreteMallocBlock, NULL
	}
};

static struct _objc_module module = {
	8, sizeof(module), NULL, (struct objc_symtab *)&symtab
};

OF_CONSTRUCTOR()
{
	__objc_exec_class(&module);
}

Modified src/runtime/ObjFWRT.h from [d9451d26e7] to [9da771698a].

698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713

/*
 * Used by the compiler, but can also be called manually.
 *
 * These declarations are also required to prevent Clang's implicit
 * declarations which include __declspec(dllimport) on Windows.
 */
struct objc_module;
extern void __objc_exec_class(struct objc_module *_Nonnull module);
extern IMP _Nonnull objc_msg_lookup(id _Nullable object, SEL _Nonnull selector);
extern IMP _Nonnull objc_msg_lookup_stret(id _Nullable object,
    SEL _Nonnull selector);
extern IMP _Nonnull objc_msg_lookup_super(struct objc_super *_Nonnull super,
    SEL _Nonnull selector);
extern IMP _Nonnull objc_msg_lookup_super_stret(
    struct objc_super *_Nonnull super, SEL _Nonnull selector);







|
|







698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713

/*
 * Used by the compiler, but can also be called manually.
 *
 * These declarations are also required to prevent Clang's implicit
 * declarations which include __declspec(dllimport) on Windows.
 */
struct _objc_module;
extern void __objc_exec_class(struct _objc_module *_Nonnull module);
extern IMP _Nonnull objc_msg_lookup(id _Nullable object, SEL _Nonnull selector);
extern IMP _Nonnull objc_msg_lookup_stret(id _Nullable object,
    SEL _Nonnull selector);
extern IMP _Nonnull objc_msg_lookup_super(struct objc_super *_Nonnull super,
    SEL _Nonnull selector);
extern IMP _Nonnull objc_msg_lookup_super_stret(
    struct objc_super *_Nonnull super, SEL _Nonnull selector);

Modified src/runtime/init.m from [c3e6c635c2] to [e2ba2ca29c].

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

#include "config.h"

#import "ObjFWRT.h"
#import "private.h"

void
__objc_exec_class(struct objc_module *module)
{
	objc_globalMutex_lock();

	objc_registerAllSelectors(module->symtab);
	objc_registerAllClasses(module->symtab);
	objc_registerAllCategories(module->symtab);
	objc_initStaticInstances(module->symtab);







|







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

#include "config.h"

#import "ObjFWRT.h"
#import "private.h"

void
__objc_exec_class(struct _objc_module *module)
{
	objc_globalMutex_lock();

	objc_registerAllSelectors(module->symtab);
	objc_registerAllClasses(module->symtab);
	objc_registerAllCategories(module->symtab);
	objc_initStaticInstances(module->symtab);

Modified src/runtime/private.h from [5dd68be0f7] to [318b5fdb1e].

177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
	unsigned long unknown;
	struct objc_selector *_Nullable selectorRefs;
	uint16_t classDefsCount;
	uint16_t categoryDefsCount;
	void *_Nonnull defs[1];
};

struct objc_module {
	unsigned long version;	/* 9 = non-fragile */
	unsigned long size;
	const char *_Nullable name;
	struct objc_symtab *_Nonnull symtab;
};

struct objc_hashtable_bucket {







|







177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
	unsigned long unknown;
	struct objc_selector *_Nullable selectorRefs;
	uint16_t classDefsCount;
	uint16_t categoryDefsCount;
	void *_Nonnull defs[1];
};

struct _objc_module {
	unsigned long version;	/* 9 = non-fragile */
	unsigned long size;
	const char *_Nullable name;
	struct objc_symtab *_Nonnull symtab;
};

struct objc_hashtable_bucket {