ObjFW  Check-in [60c6616ea4]

Overview
Comment:Fix ObjC++ with GCC
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 1.1
Files: files | file ages | folders
SHA3-256: 60c6616ea4f83e6f1f68cc02b791767e148df4ab67c3ecedb6bdeea734f3e436
User & Date: js on 2024-07-21 12:18:04
Other Links: branch diff | manifest | tags
Context
2024-07-29
19:41
-[OFKernelEventObserver cancel]: Handle EINTR check-in: 4bb1e7096e user: js tags: 1.1
2024-07-21
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:52
Set version to 1.1.5 check-in: 6e86f7b356 user: js tags: 1.1, 1.1.5-release
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 [a8d645978e] to [a33760f62e].

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 {