mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-15 08:47:35 +02:00
Bit set and unset
This commit is contained in:
parent
94d9e9a4ca
commit
33b96426d6
2 changed files with 5 additions and 5 deletions
|
@ -258,8 +258,8 @@ object Cyc_sum(void *data, object cont, int argc, object n, ...);
|
||||||
object Cyc_sub(void *data, object cont, int argc, object n, ...);
|
object Cyc_sub(void *data, object cont, int argc, object n, ...);
|
||||||
object Cyc_mul(void *data, object cont, int argc, object n, ...);
|
object Cyc_mul(void *data, object cont, int argc, object n, ...);
|
||||||
object Cyc_div(void *data, object cont, int argc, object n, ...);
|
object Cyc_div(void *data, object cont, int argc, object n, ...);
|
||||||
object Cyc_bit_and(void *data, object n1, object n2);
|
object Cyc_bit_unset(void *data, object n1, object n2);
|
||||||
object Cyc_bit_or(void *data, object n1, object n2);
|
object Cyc_bit_set(void *data, object n1, object n2);
|
||||||
object Cyc_num_op_va_list(void *data, int argc,
|
object Cyc_num_op_va_list(void *data, int argc,
|
||||||
object(fn_op(void *, common_type *, object)),
|
object(fn_op(void *, common_type *, object)),
|
||||||
int default_no_args, int default_one_arg, object n,
|
int default_no_args, int default_one_arg, object n,
|
||||||
|
|
|
@ -4500,15 +4500,15 @@ void vpbuffer_free(void **buf)
|
||||||
free(buf);
|
free(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
object Cyc_bit_and(void *data, object n1, object n2)
|
object Cyc_bit_unset(void *data, object n1, object n2)
|
||||||
{
|
{
|
||||||
Cyc_check_int(data, n1);
|
Cyc_check_int(data, n1);
|
||||||
Cyc_check_int(data, n2);
|
Cyc_check_int(data, n2);
|
||||||
return (obj_int2obj(
|
return (obj_int2obj(
|
||||||
obj_obj2int(n1) & obj_obj2int(n2)));
|
obj_obj2int(n1) & ~(obj_obj2int(n2))));
|
||||||
}
|
}
|
||||||
|
|
||||||
object Cyc_bit_or(void *data, object n1, object n2)
|
object Cyc_bit_set(void *data, object n1, object n2)
|
||||||
{
|
{
|
||||||
Cyc_check_int(data, n1);
|
Cyc_check_int(data, n1);
|
||||||
Cyc_check_int(data, n2);
|
Cyc_check_int(data, n2);
|
||||||
|
|
Loading…
Add table
Reference in a new issue