You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

23 lines
556 B

/*
* This file is part of the micropython-usermod project,
*
* https://github.com/v923z/micropython-usermod
*
* The MIT License (MIT)
*
* Copyright (c) 2019 Zoltán Vörös
*/
#include "helper.h"
mp_obj_t largemodule_add_ints(mp_obj_t a_obj, mp_obj_t b_obj) {
int a = mp_obj_get_int(a_obj);
int b = mp_obj_get_int(b_obj);
return mp_obj_new_int(a + b);
}
mp_obj_t largemodule_subtract_ints(mp_obj_t a_obj, mp_obj_t b_obj) {
int a = mp_obj_get_int(a_obj);
int b = mp_obj_get_int(b_obj);
return mp_obj_new_int(a - b);
}