ObjFW  Check-in [544663e733]

Overview
Comment:Fix using OF_{CON,DE}STRUCTOR multiple times
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 544663e733fbd8941b79bcf8a330a5204fff3f8ebd2cb0552fa35749239fabd3
User & Date: js on 2017-04-14 23:27:19
Other Links: manifest | tags
Context
2017-04-15
00:08
runtime/exception.m: Move #include <windows.h> check-in: ca2f806df3 user: js tags: trunk
2017-04-14
23:27
Fix using OF_{CON,DE}STRUCTOR multiple times check-in: 544663e733 user: js tags: trunk
05:14
ObjFW.h: Add missing imports check-in: ddd6a56658 user: js tags: trunk
Changes

Modified src/macros.h from [b2cfcb1101] to [c14ef81c9f].

337
338
339
340
341
342
343


344
345
346

347
348
349

350
351
352
353
354
355
356
337
338
339
340
341
342
343
344
345
346
347

348
349
350

351
352
353
354
355
356
357
358







+
+


-
+


-
+







	[self doesNotRecognizeSelector: _cmd];				\
									\
	abort();							\
									\
	[super dealloc];	/* Get rid of a stupid warning */
#endif

#define OF_PREPROCESSOR_CONCAT2(a, b) a##b
#define OF_PREPROCESSOR_CONCAT(a, b) OF_PREPROCESSOR_CONCAT2(a, b)
#define OF_CONSTRUCTOR(prio)					\
	static void __attribute__((__constructor__(prio)))	\
	constructor##__LINE__(void)
	OF_PREPROCESSOR_CONCAT(constructor, __LINE__)(void)
#define OF_DESTRUCTOR(prio)					\
	static void __attribute__((__destructor__(prio)))	\
	destructor##__LINE__(void)
	OF_PREPROCESSOR_CONCAT(destructor, __LINE__)(void)

static OF_INLINE uint16_t OF_CONST_FUNC
OF_BSWAP16_CONST(uint16_t i)
{
	return (i & UINT16_C(0xFF00)) >> 8 |
	    (i & UINT16_C(0x00FF)) << 8;
}