Sha256: df9dc69c8b24e579c262f1e2d94a77f7f2a55929c9c86896715e09ad83b9950a
Contents?: true
Size: 975 Bytes
Versions: 28
Compression:
Stored size: 975 Bytes
Contents
#ifndef Rice__Builtin_Object__ipp_ #define Rice__Builtin_Object__ipp_ #include "Object.hpp" #include "protect.hpp" #include "detail/check_ruby_type.hpp" #include <algorithm> namespace Rice { namespace detail { inline VALUE check_type(Object value, int type) { rb_check_type(value, type); return Qnil; } } template<typename T, int Builtin_Type> inline Builtin_Object<T, Builtin_Type>:: Builtin_Object(Object value) : Object(value) , obj_((T*)(value.value())) { protect(detail::check_type, value, Builtin_Type); } template<typename T, int Builtin_Type> inline Builtin_Object<T, Builtin_Type>:: Builtin_Object(Builtin_Object<T, Builtin_Type> const & other) : Object(other.value()) , obj_(other.obj_) { } template<typename T, int Builtin_Type> inline void Builtin_Object<T, Builtin_Type>:: swap(Builtin_Object<T, Builtin_Type> & ref) { std::swap(obj_, ref.obj_); Object::swap(ref); } } // namespace Rice #endif // Rice__Builtin_Object__ipp_
Version data entries
28 entries across 28 versions & 5 rubygems