Adjust to ObjFW changes
FossilOrigin-Name: 8d227ad0304b63791d19c8be8a836bdc348ef25c0d37ce65e70ad02ef72a362f
This commit is contained in:
parent
49b20773c3
commit
0b618f8614
1 changed files with 4 additions and 5 deletions
|
@ -416,20 +416,19 @@ OF_ASSUME_NONNULL_END
|
|||
{
|
||||
X509OID *ret;
|
||||
int length, bufferLength = 256;
|
||||
char *buffer = [self allocMemoryWithSize: bufferLength];
|
||||
char *buffer = of_alloc(1, bufferLength);
|
||||
|
||||
@try {
|
||||
while ((length = OBJ_obj2txt(buffer, bufferLength, object,
|
||||
1)) > bufferLength) {
|
||||
bufferLength = length;
|
||||
buffer = [self resizeMemory: buffer
|
||||
size: bufferLength];
|
||||
buffer = of_realloc(buffer, 1, bufferLength);
|
||||
}
|
||||
|
||||
ret = [[[X509OID alloc]
|
||||
initWithUTF8String: buffer] autorelease];
|
||||
} @finally {
|
||||
[self freeMemory: buffer];
|
||||
free(buffer);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -500,7 +499,7 @@ OF_ASSUME_NONNULL_END
|
|||
return false;
|
||||
}
|
||||
|
||||
- (uint32_t)hash
|
||||
- (unsigned long)hash
|
||||
{
|
||||
return _string.hash;
|
||||
}
|
||||
|
|
Reference in a new issue