py: Fix function type: () -> (void).
This commit is contained in:
parent
78d702c300
commit
b4fe6e28eb
2
py/mpz.h
2
py/mpz.h
@ -75,7 +75,7 @@ void mpz_init_from_int(mpz_t *z, mp_int_t val);
|
||||
void mpz_init_fixed_from_int(mpz_t *z, mpz_dig_t *dig, mp_uint_t dig_alloc, mp_int_t val);
|
||||
void mpz_deinit(mpz_t *z);
|
||||
|
||||
mpz_t *mpz_zero();
|
||||
mpz_t *mpz_zero(void);
|
||||
mpz_t *mpz_from_int(mp_int_t i);
|
||||
mpz_t *mpz_from_ll(long long i, bool is_signed);
|
||||
mpz_t *mpz_from_str(const char *str, mp_uint_t len, bool neg, mp_uint_t base);
|
||||
|
@ -46,7 +46,7 @@ STATIC mp_obj_t str_modulo_format(mp_obj_t pattern, mp_uint_t n_args, const mp_o
|
||||
mp_obj_t mp_obj_new_str_iterator(mp_obj_t str);
|
||||
STATIC mp_obj_t mp_obj_new_bytes_iterator(mp_obj_t str);
|
||||
STATIC NORETURN void bad_implicit_conversion(mp_obj_t self_in);
|
||||
STATIC NORETURN void arg_type_mixup();
|
||||
STATIC NORETURN void arg_type_mixup(void);
|
||||
|
||||
/******************************************************************************/
|
||||
/* str */
|
||||
@ -1957,7 +1957,7 @@ STATIC void bad_implicit_conversion(mp_obj_t self_in) {
|
||||
}
|
||||
}
|
||||
|
||||
STATIC void arg_type_mixup() {
|
||||
STATIC void arg_type_mixup(void) {
|
||||
nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "Can't mix str and bytes arguments"));
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,12 @@
|
||||
// Stack top at the start of program
|
||||
char *stack_top;
|
||||
|
||||
void mp_stack_ctrl_init() {
|
||||
void mp_stack_ctrl_init(void) {
|
||||
volatile int stack_dummy;
|
||||
stack_top = (char*)&stack_dummy;
|
||||
}
|
||||
|
||||
mp_uint_t mp_stack_usage() {
|
||||
mp_uint_t mp_stack_usage(void) {
|
||||
// Assumes descending stack
|
||||
volatile int stack_dummy;
|
||||
return stack_top - (char*)&stack_dummy;
|
||||
@ -54,7 +54,7 @@ void mp_stack_set_limit(mp_uint_t limit) {
|
||||
stack_limit = limit;
|
||||
}
|
||||
|
||||
void mp_stack_check() {
|
||||
void mp_stack_check(void) {
|
||||
if (mp_stack_usage() >= stack_limit) {
|
||||
nlr_raise(mp_obj_new_exception_msg(&mp_type_RuntimeError, "maximum recursion depth exceeded"));
|
||||
}
|
||||
|
@ -24,13 +24,13 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
void mp_stack_ctrl_init();
|
||||
mp_uint_t mp_stack_usage();
|
||||
void mp_stack_ctrl_init(void);
|
||||
mp_uint_t mp_stack_usage(void);
|
||||
|
||||
#if MICROPY_STACK_CHECK
|
||||
|
||||
void mp_stack_set_limit(mp_uint_t limit);
|
||||
void mp_stack_check();
|
||||
void mp_stack_check(void);
|
||||
#define MP_STACK_CHECK() mp_stack_check()
|
||||
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user