summaryrefslogtreecommitdiff
path: root/ruby/src/IceRuby/Util.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2016-10-20 21:03:44 -0400
committerBernard Normier <bernard@zeroc.com>2016-10-20 21:03:44 -0400
commit3cb9c15995b828c52dba34d0a222f572d5bbc41b (patch)
tree87bad249c2ee04972be5f3c7635880cb0c556128 /ruby/src/IceRuby/Util.cpp
parentupdating IceBT to BlueZ 5 (diff)
downloadice-3cb9c15995b828c52dba34d0a222f572d5bbc41b.tar.bz2
ice-3cb9c15995b828c52dba34d0a222f572d5bbc41b.tar.xz
ice-3cb9c15995b828c52dba34d0a222f572d5bbc41b.zip
Added support for non-ASCII characters and universal character names
to stringified identities and proxies. This includes a new Ice.ToStringMode property.
Diffstat (limited to 'ruby/src/IceRuby/Util.cpp')
-rw-r--r--ruby/src/IceRuby/Util.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/ruby/src/IceRuby/Util.cpp b/ruby/src/IceRuby/Util.cpp
index ef076d04bd8..7fa1222fb06 100644
--- a/ruby/src/IceRuby/Util.cpp
+++ b/ruby/src/IceRuby/Util.cpp
@@ -442,8 +442,8 @@ IceRuby::contextToHash(const Ice::Context& ctx)
volatile VALUE result = callRuby(rb_hash_new);
for(Ice::Context::const_iterator p = ctx.begin(); p != ctx.end(); ++p)
{
- volatile VALUE key = callRuby(rb_str_new, p->first.c_str(), static_cast<long>(p->first.size()));
- volatile VALUE value = callRuby(rb_str_new, p->second.c_str(), static_cast<long>(p->second.size()));
+ volatile VALUE key = createString(p->first);
+ volatile VALUE value = createString(p->second);
callRuby(rb_hash_aset, result, key, value);
}
return result;
@@ -522,8 +522,8 @@ IceRuby::createIdentity(const Ice::Identity& id)
assert(!NIL_P(cls));
volatile VALUE result = callRuby(rb_class_new_instance, 0, reinterpret_cast<VALUE*>(0), cls);
- volatile VALUE name = callRuby(rb_str_new, id.name.c_str(), static_cast<long>(id.name.size()));
- volatile VALUE category = callRuby(rb_str_new, id.category.c_str(), static_cast<long>(id.category.size()));
+ volatile VALUE name = createString(id.name);
+ volatile VALUE category = createString(id.category);
callRuby(rb_iv_set, result, "@name", name);
callRuby(rb_iv_set, result, "@category", category);
return result;