Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  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);
  11.  
  12.     tp_set(tp, bit_mod, tp_string("__doc__"), tp_string("Bitwise operations for large numbers"));
  13.     tp_set(tp, bit_mod, tp_string("__name__"), tp_string("bitwise"));
  14.     tp_set(tp, bit_mod, tp_string("__file__"), tp_string(__FILE__));
  15.  
  16.     tp_set(tp, tp->modules, tp_string("bitwise"), bit_mod);
  17. }
  18.