summaryrefslogtreecommitdiff
path: root/py/obj.h
diff options
context:
space:
mode:
Diffstat (limited to 'py/obj.h')
-rw-r--r--py/obj.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/py/obj.h b/py/obj.h
index 351310afa..49167bfcc 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -15,8 +15,8 @@ typedef machine_int_t mp_small_int_t;
typedef machine_float_t mp_float_t;
#endif
-// Anything that wants to be a Micro Python object must
-// have mp_obj_base_t as its first member (except NULL and small ints)
+// Anything that wants to be a Micro Python object must have
+// mp_obj_base_t as its first member (except NULL and small ints)
struct _mp_obj_type_t;
struct _mp_obj_base_t {
@@ -107,6 +107,7 @@ struct _mp_obj_type_t {
__next__ gen-instance
*/
};
+
typedef struct _mp_obj_type_t mp_obj_type_t;
// Constant objects, globally accessible
@@ -201,10 +202,12 @@ qstr mp_obj_str_get(mp_obj_t self_in);
// float
extern const mp_obj_type_t float_type;
mp_float_t mp_obj_float_get(mp_obj_t self_in);
+mp_obj_t mp_obj_float_binary_op(int op, mp_float_t lhs_val, mp_obj_t rhs);
// complex
extern const mp_obj_type_t complex_type;
void mp_obj_complex_get(mp_obj_t self_in, mp_float_t *real, mp_float_t *imag);
+mp_obj_t mp_obj_complex_binary_op(int op, mp_float_t lhs_real, mp_float_t lhs_imag, mp_obj_t rhs_in);
#endif
// tuple
@@ -240,6 +243,7 @@ typedef struct _mp_obj_fun_native_t { // need this so we can define const object
// for const function objects, make an empty, const map
// such functions won't be able to access the global scope, but that's probably okay
} mp_obj_fun_native_t;
+
extern const mp_obj_type_t fun_native_type;
extern const mp_obj_type_t fun_bc_type;
void mp_obj_fun_bc_get(mp_obj_t self_in, int *n_args, uint *n_state, const byte **code);