diff options
author | Josh Haberman <jhaberman@gmail.com> | 2014-08-09 05:17:35 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2014-08-09 05:17:35 -0700 |
commit | a25c50361a0ca55962e7f2f979a0fca515dc7f06 (patch) | |
tree | 7450c7724efbd074b5a83a655c770c34b4cd8525 /upb | |
parent | d869097400048af4b943e0679bab21b759facb80 (diff) |
Added optimization note.
Diffstat (limited to 'upb')
-rw-r--r-- | upb/bindings/ruby/upb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/upb/bindings/ruby/upb.c b/upb/bindings/ruby/upb.c index 936baef..0d25610 100644 --- a/upb/bindings/ruby/upb.c +++ b/upb/bindings/ruby/upb.c @@ -245,6 +245,8 @@ static VALUE msg_accessor(int argc, VALUE *argv, VALUE obj) { // method_missing protocol: (method [, arg1, arg2, ...]) assert(argc >= 1 && SYMBOL_P(argv[0])); + // OPT(haberman): find a better way to get the method name. + // This is allocating a new string each time, which should not be necessary. VALUE method = rb_id2str(SYM2ID(argv[0])); const char *method_str = RSTRING_PTR(method); size_t method_len = RSTRING_LEN(method); |