Skip to content

Commit 052ae26

Browse files
bool, not size_t
1 parent 36a812e commit 052ae26

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/basic/flow_control.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void endproc_statement(struct basic_ctx* ctx);
5454
* @param param Pointer to the linked list of parameter types and names
5555
* @return uint8_t 1 if more parameters are present, 0 otherwise.
5656
*/
57-
size_t extract_comma_list(struct ub_proc_fn_def* def, struct basic_ctx* ctx, int* bracket_depth, char const** item_begin, struct ub_param** param);
57+
bool extract_comma_list(struct ub_proc_fn_def* def, struct basic_ctx* ctx, int* bracket_depth, char const** item_begin, struct ub_param** param);
5858

5959
/**
6060
* @brief Handles the = statement in BASIC, used to return a value from a FN

src/basic/function.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ struct basic_str_fn builtin_str[] =
162162
};
163163

164164

165-
size_t extract_comma_list(struct ub_proc_fn_def* def, struct basic_ctx* ctx, int* bracket_depth, char const** item_begin, struct ub_param** param) {
165+
bool extract_comma_list(struct ub_proc_fn_def* def, struct basic_ctx* ctx, int* bracket_depth, char const** item_begin, struct ub_param** param) {
166166
if (*ctx->ptr == '(') {
167167
(*bracket_depth)++;
168168
if (*bracket_depth == 1) {
@@ -211,9 +211,9 @@ size_t extract_comma_list(struct ub_proc_fn_def* def, struct basic_ctx* ctx, int
211211

212212
if ((*bracket_depth) == 0 || *ctx->ptr == 0) {
213213
ctx->nextptr = ctx->ptr;
214-
return 0;
214+
return false;
215215
}
216-
return 1;
216+
return true;
217217
}
218218

219219
const char* basic_eval_str_fn(const char* fn_name, struct basic_ctx* ctx)

0 commit comments

Comments
 (0)