unification uses of int and size_t. use size_t for every variable that
can possibly be used as an array index.
This commit is contained in:
+1
-1
@@ -151,7 +151,7 @@ struct pic_string *pic_str_new_cstr(pic_state *, const char *);
|
||||
|
||||
struct pic_vector *pic_vec_new(pic_state *, size_t);
|
||||
struct pic_vector *pic_vec_new_from_list(pic_state *, pic_value);
|
||||
void pic_vec_extend_ip(pic_state *, struct pic_vector *, int);
|
||||
void pic_vec_extend_ip(pic_state *, struct pic_vector *, size_t);
|
||||
|
||||
int pic_parse_file(pic_state *, FILE *file, pic_value *);
|
||||
int pic_parse_cstr(pic_state *, const char *, pic_value *);
|
||||
|
||||
@@ -12,13 +12,13 @@ extern "C" {
|
||||
struct pic_blob {
|
||||
PIC_OBJECT_HEADER
|
||||
char *data;
|
||||
int len;
|
||||
size_t len;
|
||||
};
|
||||
|
||||
#define pic_blob_p(v) (pic_type(v) == PIC_TT_BLOB)
|
||||
#define pic_blob_ptr(v) ((struct pic_blob *)pic_ptr(v))
|
||||
|
||||
struct pic_blob *pic_blob_new(pic_state *, char *, int len);
|
||||
struct pic_blob *pic_blob_new(pic_state *, char *, size_t len);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ struct parser_control {
|
||||
bool incomp;
|
||||
int yynerrs;
|
||||
struct pic_vector *yy_arena;
|
||||
int yy_arena_idx;
|
||||
size_t yy_arena_idx;
|
||||
};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
Reference in New Issue
Block a user