Rev 8535 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8535 | superturbo | 1 | #include "tinypy.h" |
2 | #include "bitwise.c" |
||
3 | |||
4 | #define EXPORT(MOD_NAME, F_NAME, F_POINT) tp_set(tp, MOD_NAME , tp_string(F_NAME), tp_fnc(tp, F_POINT)) |
||
5 | |||
6 | void bitwise_init(TP) |
||
7 | { |
||
8 | tp_obj bit_mod = tp_dict(tp); |
||
9 | |||
10 | EXPORT(bit_mod, "add" , _add); |
||
8578 | superturbo | 11 | EXPORT(bit_mod, "mul" , _mul); |
8535 | superturbo | 12 | |
13 | tp_set(tp, bit_mod, tp_string("__doc__"), tp_string("Bitwise operations for large numbers")); |
||
14 | tp_set(tp, bit_mod, tp_string("__name__"), tp_string("bitwise")); |
||
15 | tp_set(tp, bit_mod, tp_string("__file__"), tp_string(__FILE__)); |
||
16 | |||
17 | tp_set(tp, tp->modules, tp_string("bitwise"), bit_mod); |
||
18 | } |