Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-byers committed Aug 28, 2024
1 parent f8c9e92 commit a5e248e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/value.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ static int char2base(char c)
#define SKIP_SPACES(p) \
while (ISSPACE(*(p))) ++(p);

int pawV_parse_uint64(paw_Env *P, const char *text, int base)
int pawV_parse_uint64(paw_Env *P, const char *text, unsigned base)
{
int b = 10;
SKIP_SPACES(text);
Expand Down Expand Up @@ -311,7 +311,7 @@ static paw_Bool parse_negative(const char **ptext)
return PAW_FALSE;
}

int pawV_parse_int(paw_Env *P, const char *text, int base)
int pawV_parse_int(paw_Env *P, const char *text, unsigned base)
{
const char *original = text;
SKIP_SPACES(text);
Expand Down
4 changes: 2 additions & 2 deletions src/value.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ static inline size_t pawV_check_abs(paw_Env *P, paw_Int index, size_t length, co
// Understands non-decimal base prefixes '0b', '0o', '0x', and their uppercase
// counterparts. Returns PAW_ESYNTAX if the integer is malformed,
// PAW_EOVERFLOW if it is too large to fit in a uint64_t, and PAW_OK otherwise.
int pawV_parse_uint64(paw_Env *P, const char *text, int base);
int pawV_parse_uint64(paw_Env *P, const char *text, unsigned base);

int pawV_parse_int(paw_Env *P, const char *text, int base);
int pawV_parse_int(paw_Env *P, const char *text, unsigned base);

// Convert a null-terminated string into a float
// Returns 0 on success, -1 otherwise.
Expand Down

0 comments on commit a5e248e

Please sign in to comment.