Skip to content

Commit 5318cc0

Browse files
committed
py: Tidy up a few function declarations.
1 parent 7eb2317 commit 5318cc0

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

py/obj.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@ mp_obj_t mp_obj_new_int_from_ll(long long val); // this must return a multi-prec
395395
mp_obj_t mp_obj_new_int_from_ull(unsigned long long val); // this must return a multi-precision integer object (or raise an overflow exception)
396396
mp_obj_t mp_obj_new_str(const char* data, mp_uint_t len, bool make_qstr_if_not_already);
397397
mp_obj_t mp_obj_new_bytes(const byte* data, mp_uint_t len);
398+
mp_obj_t mp_obj_new_bytearray(mp_uint_t n, void *items);
399+
mp_obj_t mp_obj_new_bytearray_by_ref(mp_uint_t n, void *items);
398400
#if MICROPY_PY_BUILTINS_FLOAT
399401
mp_obj_t mp_obj_new_float(mp_float_t val);
400402
mp_obj_t mp_obj_new_complex(mp_float_t real, mp_float_t imag);
@@ -549,9 +551,6 @@ void mp_obj_set_store(mp_obj_t self_in, mp_obj_t item);
549551
// slice
550552
void mp_obj_slice_get(mp_obj_t self_in, mp_obj_t *start, mp_obj_t *stop, mp_obj_t *step);
551553

552-
// array
553-
mp_obj_t mp_obj_new_bytearray_by_ref(mp_uint_t n, void *items);
554-
555554
// functions
556555
#define MP_OBJ_FUN_ARGS_MAX (0xffff) // to set maximum value in n_args_max below
557556
typedef struct _mp_obj_fun_builtin_t { // use this to make const objects that go in ROM

py/unicode.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
#include "mpconfig.h"
3030
#include "misc.h"
31+
#include "unicode.h"
3132

3233
// attribute flags
3334
#define FL_PRINT (0x01)
@@ -96,7 +97,7 @@ const byte *utf8_next_char(const byte *s) {
9697
#endif
9798
}
9899

99-
mp_uint_t utf8_ptr_to_index(const char *s, const char *ptr) {
100+
mp_uint_t utf8_ptr_to_index(const byte *s, const byte *ptr) {
100101
mp_uint_t i = 0;
101102
while (ptr > s) {
102103
if (!UTF8_IS_CONT(*--ptr)) {

0 commit comments

Comments
 (0)