diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-05-12 13:45:22 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-05-12 13:45:22 -0230 |
commit | c1b188709a4a257182071697c685d18af0de89d0 (patch) | |
tree | 9cc2952a2e67da8eedd00a97871aed4cfbcced3a /rb/src/IceRuby/Proxy.cpp | |
parent | Bug 3921 - mention build options in README.DEMOS (diff) | |
download | ice-c1b188709a4a257182071697c685d18af0de89d0.tar.bz2 ice-c1b188709a4a257182071697c685d18af0de89d0.tar.xz ice-c1b188709a4a257182071697c685d18af0de89d0.zip |
Bug 3418 - deprecate ice_hash/ice_getHash where not needed
Diffstat (limited to 'rb/src/IceRuby/Proxy.cpp')
-rw-r--r-- | rb/src/IceRuby/Proxy.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/rb/src/IceRuby/Proxy.cpp b/rb/src/IceRuby/Proxy.cpp index fbe9c7e9308..dcc2633660b 100644 --- a/rb/src/IceRuby/Proxy.cpp +++ b/rb/src/IceRuby/Proxy.cpp @@ -225,6 +225,21 @@ extern "C" VALUE IceRuby_ObjectPrx_ice_getHash(VALUE self) { + rb_warning("ice_getHash is deprecated, use hash instead."); + + ICE_RUBY_TRY + { + Ice::ObjectPrx p = getProxy(self); + return INT2FIX(p->ice_getHash()); + } + ICE_RUBY_CATCH + return Qnil; +} + +extern "C" +VALUE +IceRuby_ObjectPrx_hash(VALUE self) +{ ICE_RUBY_TRY { Ice::ObjectPrx p = getProxy(self); @@ -1357,7 +1372,7 @@ IceRuby::initProxy(VALUE iceModule) rb_define_method(_proxyClass, "ice_getConnection", CAST_METHOD(IceRuby_ObjectPrx_ice_getConnection), 0); rb_define_method(_proxyClass, "ice_getCachedConnection", CAST_METHOD(IceRuby_ObjectPrx_ice_getCachedConnection), 0); - rb_define_method(_proxyClass, "hash", CAST_METHOD(IceRuby_ObjectPrx_ice_getHash), 0); + rb_define_method(_proxyClass, "hash", CAST_METHOD(IceRuby_ObjectPrx_hash), 0); rb_define_method(_proxyClass, "to_s", CAST_METHOD(IceRuby_ObjectPrx_ice_toString), 0); rb_define_method(_proxyClass, "inspect", CAST_METHOD(IceRuby_ObjectPrx_ice_toString), 0); rb_define_method(_proxyClass, "<=>", CAST_METHOD(IceRuby_ObjectPrx_cmp), 1); |