40 int type = TYPEOF(x) ;
46 SEXP charSym = Rf_installChar(x);
47 Storage::set__( charSym ) ;
52 SEXP charSym = Rf_installChar(STRING_ELT(x, 0 ));
53 Storage::set__( charSym );
57 const char* fmt =
"Cannot convert object to a symbol: "
58 "[type=%s; target=SYMSXP].";
59 throw not_compatible(fmt, Rf_type2char(TYPEOF(x)));
63 Symbol_Impl(
const std::string& symbol){
64 Storage::set__( Rf_install(symbol.c_str()) );
66 inline const char* c_str()
const {
67 return CHAR(PRINTNAME(Storage::get__())) ;
69 inline bool operator==(
const char* other)
const {
70 return ! strcmp(other, c_str() );