]> gitweb.factorcode.org Git - factor.git/blob - vm/booleans.cpp
Removed VM_PTR macros. All builds reentrant by default
[factor.git] / vm / booleans.cpp
1 #include "master.hpp"
2
3 namespace factor
4 {
5
6 void factor_vm::box_boolean(bool value)
7 {
8         dpush(value ? T : F);
9 }
10
11 VM_C_API void box_boolean(bool value, factor_vm *myvm)
12 {
13         return myvm->box_boolean(value);
14 }
15
16 bool factor_vm::to_boolean(cell value)
17 {
18         return value != F;
19 }
20
21 VM_C_API bool to_boolean(cell value, factor_vm *myvm)
22 {
23         return myvm->to_boolean(value);
24 }
25
26 }