1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00
therubyracer/ext/v8/convert.cc
2012-05-17 11:04:05 -05:00

16 lines
No EOL
200 B
C++

#include "rr.h"
namespace rr {
VALUE Bool(bool b) {
return b ? Qtrue : Qfalse;
}
int Int(VALUE v) {
return RTEST(v) ? NUM2INT(v) : 0;
}
uint32_t UInt32(VALUE num) {
return NUM2UINT(num);
}
}