comments, use Nothing instead of voidptr
This commit is contained in:
@@ -74,16 +74,16 @@ ResultType(SolsTokens, charptr) createSolsTokens() {
|
||||
return Success(SolsTokens, charptr, tokens);
|
||||
}
|
||||
|
||||
ResultType(voidptr, charptr) addTokenToSolsTokens(SolsTokens* tokens, SolsToken token) {
|
||||
ResultType(Nothing, charptr) addTokenToSolsTokens(SolsTokens* tokens, SolsToken token) {
|
||||
if (tokens->capacity < tokens->count + 1) {
|
||||
tokens->capacity *= 2;
|
||||
SolsToken* tmp = realloc(tokens->at, sizeof(SolsToken) * tokens->capacity);
|
||||
if (tmp == NULL) {
|
||||
return Error(voidptr, charptr, "Failed to allocate memory (in addTokenToSolsTokens() function)");
|
||||
return Error(Nothing, charptr, "Failed to allocate memory (in addTokenToSolsTokens() function)");
|
||||
}
|
||||
tokens->at = tmp;
|
||||
}
|
||||
tokens->at[tokens->count] = token;
|
||||
tokens->count++;
|
||||
return Success(voidptr, charptr, NULL);
|
||||
return Success(Nothing, charptr, {});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user