168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
const char *objCType;
size_t size;
void *value, *otherValue;
if (![object isKindOfClass: [OFValue class]])
return false;
objCType = [self objCType];
if (strcmp([object objCType], objCType) != 0)
return false;
size = of_sizeof_type_encoding(objCType);
if ((value = malloc(size)) == NULL)
|
|
|
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
const char *objCType;
size_t size;
void *value, *otherValue;
if (![object isKindOfClass: [OFValue class]])
return false;
objCType = self.objCType;
if (strcmp([object objCType], objCType) != 0)
return false;
size = of_sizeof_type_encoding(objCType);
if ((value = malloc(size)) == NULL)
|
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
free(value);
free(otherValue);
}
}
- (uint32_t)hash
{
size_t size = of_sizeof_type_encoding([self objCType]);
unsigned char *value;
uint32_t hash;
if ((value = malloc(size)) == NULL)
@throw [OFOutOfMemoryException
exceptionWithRequestedSize: size];
|
|
|
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
free(value);
free(otherValue);
}
}
- (uint32_t)hash
{
size_t size = of_sizeof_type_encoding(self.objCType);
unsigned char *value;
uint32_t hash;
if ((value = malloc(size)) == NULL)
@throw [OFOutOfMemoryException
exceptionWithRequestedSize: size];
|
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
return ret;
}
- (OFString *)description
{
OFMutableString *ret =
[OFMutableString stringWithString: @"<OFValue: "];
size_t size = of_sizeof_type_encoding([self objCType]);
unsigned char *value;
if ((value = malloc(size)) == NULL)
@throw [OFOutOfMemoryException
exceptionWithRequestedSize: size];
@try {
|
|
|
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
return ret;
}
- (OFString *)description
{
OFMutableString *ret =
[OFMutableString stringWithString: @"<OFValue: "];
size_t size = of_sizeof_type_encoding(self.objCType);
unsigned char *value;
if ((value = malloc(size)) == NULL)
@throw [OFOutOfMemoryException
exceptionWithRequestedSize: size];
@try {
|