mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
16 lines
No EOL
200 B
C++
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);
|
|
}
|
|
} |