Added new functions in ksys module
Added socket module(WIP) git-svn-id: svn://kolibrios.org@8578 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -11,3 +11,10 @@ static tp_obj _add(TP){
|
||||
return tp_number(num1 | num2);
|
||||
}
|
||||
|
||||
static tp_obj _mul(TP){
|
||||
unsigned num1 = (unsigned)GET_NUM_ARG();
|
||||
unsigned num2 = (unsigned)GET_NUM_ARG();
|
||||
return tp_number(num1 & num2);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -8,6 +8,7 @@ void bitwise_init(TP)
|
||||
tp_obj bit_mod = tp_dict(tp);
|
||||
|
||||
EXPORT(bit_mod, "add" , _add);
|
||||
EXPORT(bit_mod, "mul" , _mul);
|
||||
|
||||
tp_set(tp, bit_mod, tp_string("__doc__"), tp_string("Bitwise operations for large numbers"));
|
||||
tp_set(tp, bit_mod, tp_string("__name__"), tp_string("bitwise"));
|
||||
|
Reference in New Issue
Block a user