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;
|
X509OID *ret;
|
||||||
int length, bufferLength = 256;
|
int length, bufferLength = 256;
|
||||||
char *buffer = [self allocMemoryWithSize: bufferLength];
|
char *buffer = of_alloc(1, bufferLength);
|
||||||
|
|
||||||
@try {
|
@try {
|
||||||
while ((length = OBJ_obj2txt(buffer, bufferLength, object,
|
while ((length = OBJ_obj2txt(buffer, bufferLength, object,
|
||||||
1)) > bufferLength) {
|
1)) > bufferLength) {
|
||||||
bufferLength = length;
|
bufferLength = length;
|
||||||
buffer = [self resizeMemory: buffer
|
buffer = of_realloc(buffer, 1, bufferLength);
|
||||||
size: bufferLength];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = [[[X509OID alloc]
|
ret = [[[X509OID alloc]
|
||||||
initWithUTF8String: buffer] autorelease];
|
initWithUTF8String: buffer] autorelease];
|
||||||
} @finally {
|
} @finally {
|
||||||
[self freeMemory: buffer];
|
free(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -500,7 +499,7 @@ OF_ASSUME_NONNULL_END
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (uint32_t)hash
|
- (unsigned long)hash
|
||||||
{
|
{
|
||||||
return _string.hash;
|
return _string.hash;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue