Skip to content

Commit a345d63

Browse files
committed
Bit of code cleanup.
1 parent 3a6d9f6 commit a345d63

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

rice/stl/string.ipp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ namespace Rice::detail
8585
{
8686
}
8787

88-
8988
VALUE convert(const std::string* x)
9089
{
9190
return detail::protect(rb_external_str_new, x->data(), (long)x->size());
@@ -140,7 +139,7 @@ namespace Rice::detail
140139

141140
std::string convert(VALUE value)
142141
{
143-
detail::protect(rb_check_type, value, (int)T_STRING);
142+
detail::protect(rb_check_type, value, (int)RUBY_T_STRING);
144143
return std::string(RSTRING_PTR(value), RSTRING_LEN(value));
145144
}
146145

@@ -172,7 +171,7 @@ namespace Rice::detail
172171

173172
std::string& convert(VALUE value)
174173
{
175-
detail::protect(rb_check_type, value, (int)T_STRING);
174+
detail::protect(rb_check_type, value, (int)RUBY_T_STRING);
176175
this->converted_ = std::string(RSTRING_PTR(value), RSTRING_LEN(value));
177176
return this->converted_;
178177
}
@@ -240,7 +239,7 @@ namespace Rice::detail
240239

241240
std::string* convert(VALUE value)
242241
{
243-
detail::protect(rb_check_type, value, (int)T_STRING);
242+
detail::protect(rb_check_type, value, (int)RUBY_T_STRING);
244243
this->converted_ = std::string(RSTRING_PTR(value), RSTRING_LEN(value));
245244
return &this->converted_;
246245
}

0 commit comments

Comments
 (0)