ObjXMPP  Diff

Differences From Artifact [1e77051632]:

To Artifact [18e0ab5705]:


1
2

3
4
5
6
7
8
9
1

2
3
4
5
6
7
8
9

-
+







/*
 * Copyright (c) 2012, 2019, Jonathan Schleifer <js@webkeks.org>
 * Copyright (c) 2012, 2019, 2021, Jonathan Schleifer <js@nil.im>
 *
 * https://heap.zone/objxmpp/
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice is present in all copies.
 *
46
47
48
49
50
51
52
53

54
55
56
57
58
59
60
46
47
48
49
50
51
52

53
54
55
56
57
58
59
60







-
+








	@try {
		void *pool = objc_autoreleasePoolPush();

		_file = [file copy];
		@try {
			_data = [[OFData dataWithContentsOfFile: file]
			    .messagePackValue copy];
			    .objectByParsingMessagePack copy];
		} @catch (id e) {
			_data = [[OFMutableDictionary alloc] init];
		}

		objc_autoreleasePoolPop(pool);
	} @catch (id e) {
		[self release];
158
159
160
161
162
163
164
165

166
167
168
169
170

171
172
173
174
175
176

177
178
179

180
181

182
183
184
185
186
187
188
158
159
160
161
162
163
164

165
166
167
168
169

170
171
172
173
174
175

176
177
178

179
180

181
182
183
184
185
186
187
188







-
+




-
+





-
+


-
+

-
+







	boolean = [[self xmpp_objectForPath: path] boolValue];

	objc_autoreleasePoolPop(pool);

	return boolean;
}

- (void)setIntegerValue: (intmax_t)integer
- (void)setIntegerValue: (long long)integer
		forPath: (OFString *)path
{
	void *pool = objc_autoreleasePoolPush();

	[self xmpp_setObject: [OFNumber numberWithIntMax: integer]
	[self xmpp_setObject: [OFNumber numberWithLongLong: integer]
		     forPath: path];

	objc_autoreleasePoolPop(pool);
}

- (intmax_t)integerValueForPath: (OFString *)path
- (long long)integerValueForPath: (OFString *)path
{
	void *pool = objc_autoreleasePoolPush();
	intmax_t integer;
	long long integer;

	integer = [[self xmpp_objectForPath: path] intMaxValue];
	integer = [[self xmpp_objectForPath: path] longLongValue];

	objc_autoreleasePoolPop(pool);

	return integer;
}

- (void)setArray: (OFArray *)array