rice/Identifier.ipp in rice-3.0.0 vs rice/Identifier.ipp in rice-4.0.0

- old
+ new

@@ -1,33 +1,29 @@ -inline Rice::Identifier:: -Identifier(ID id) - : id_(id) +namespace Rice { -} + inline Identifier::Identifier(ID id) : id_(id) + { + } -inline Rice::Identifier:: -Identifier(char const * s) - : id_(rb_intern(s)) -{ -} + inline Identifier::Identifier(char const* s) : id_(rb_intern(s)) + { + } -inline char const * -Rice::Identifier:: -c_str() const -{ - return rb_id2name(id_); -} + inline Identifier::Identifier(std::string const s) : id_(rb_intern(s.c_str())) + { + } -inline std::string -Rice::Identifier:: -str() const -{ - return c_str(); -} + inline char const* Identifier::c_str() const + { + return detail::protect(rb_id2name, id_); + } -inline VALUE -Rice::Identifier:: -to_sym() const -{ - return ID2SYM(id_); -} + inline std::string Identifier::str() const + { + return c_str(); + } + inline VALUE Identifier::to_sym() const + { + return ID2SYM(id_); + } +} \ No newline at end of file