ObjFW  Diff

Differences From Artifact [e9161f0524]:

To Artifact [223399c150]:


80
81
82
83
84
85
86






87
88
89
90
91
92
93
		[_impl writeFormat: @"#import \"%@\"\n",
				    include.stringValue];

	[_impl writeFormat: @"\n"
			    @"extern struct Library *%@;\n"
			    @"\n",
			    libBase];







	functions = [_library elementsForName: @"function"];
	for (OFXMLElement *function in functions) {
		OFString *name =
		    [function attributeForName: @"name"].stringValue;
		OFString *returnType =
		    [function attributeForName: @"return-type"].stringValue;







>
>
>
>
>
>







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
		[_impl writeFormat: @"#import \"%@\"\n",
				    include.stringValue];

	[_impl writeFormat: @"\n"
			    @"extern struct Library *%@;\n"
			    @"\n",
			    libBase];

	[_impl writeString:
	    @"#if OF_GCC_VERSION >= 1100\n"
	    @"# pragma GCC diagnostic ignored \"-Warray-parameter\"\n"
	    @"#endif\n"
	    @"\n"];

	functions = [_library elementsForName: @"function"];
	for (OFXMLElement *function in functions) {
		OFString *name =
		    [function attributeForName: @"name"].stringValue;
		OFString *returnType =
		    [function attributeForName: @"return-type"].stringValue;
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158

			if (argumentIndex++ > 0)
				[_impl writeString: @", "];

			[_impl writeString: argType];
			if (![argType hasSuffix: @"*"])
				[_impl writeString: @" "];
			[_impl writeFormat: @"__asm__(\"%@\")",
						    m68kReg];
		}

		[_impl writeFormat: @"))(((uintptr_t)%@) - %zu))(",
				    libBase, 30 + funcIndex * 6];

		argumentIndex = 0;
		for (OFXMLElement *argument in







|
<







149
150
151
152
153
154
155
156

157
158
159
160
161
162
163

			if (argumentIndex++ > 0)
				[_impl writeString: @", "];

			[_impl writeString: argType];
			if (![argType hasSuffix: @"*"])
				[_impl writeString: @" "];
			[_impl writeFormat: @"__asm__(\"%@\")", m68kReg];

		}

		[_impl writeFormat: @"))(((uintptr_t)%@) - %zu))(",
				    libBase, 30 + funcIndex * 6];

		argumentIndex = 0;
		for (OFXMLElement *argument in