mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
d1e9088cf0
You can now create a JS object from Ruby-land without segfaulting
18 lines
287 B
C++
18 lines
287 B
C++
#ifndef RR_UINT32
|
|
#define RR_UINT32
|
|
|
|
namespace rr {
|
|
|
|
class UInt32 : public Equiv {
|
|
public:
|
|
UInt32(VALUE val) : Equiv(val) {}
|
|
UInt32(uint32_t ui) : Equiv(UINT2NUM(ui)) {}
|
|
|
|
inline operator uint32_t() {
|
|
return RTEST(value) ? NUM2UINT(value) : 0;
|
|
}
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|