ObjFW  Diff

Differences From Artifact [77a19bfe68]:

To Artifact [f1e270d342]:


103
104
105
106
107
108
109
110

111
112
113
114
115
116
117
118
119

120
121
122
123
124
125
126
103
104
105
106
107
108
109

110

111
112
113
114
115
116


117
118
119
120
121
122
123
124







-
+
-






-
-
+








			if (iter->longOption != nil) {
				@try {
					iter2->longOption =
					    [iter->longOption copy];

					if ([_longOptions objectForKey:
					    (OFString *)iter2->longOption] !=
					    iter2->longOption] != NULL)
					    NULL)
						@throw
						    [OFInvalidArgumentException
						    exception];

					[_longOptions
					    setObject: iter2
					       forKey: (OFString *)
							   iter2->longOption];
					       forKey: iter2->longOption];
				} @catch (id e) {
					/*
					 * Make sure we are in a consistent
					 * state where dealloc works.
					 */
					[iter2->longOption release];

207
208
209
210
211
212
213
214

215
216
217
218
219
220
221
222
205
206
207
208
209
210
211

212

213
214
215
216
217
218
219







-
+
-







				pos = [argument length];

			_lastLongOption = [[argument substringWithRange:
			    of_range(2, pos - 2)] copy];

			objc_autoreleasePoolPop(pool);

			option = [_longOptions objectForKey:
			option = [_longOptions objectForKey: _lastLongOption];
			    (OFString *)_lastLongOption];
			if (option == NULL)
				return '?';

			if (option->hasArgument == 1 && _argument == nil)
				return ':';
			if (option->hasArgument == 0 && _argument != nil)
				return '=';