From 231886f6327b7cad480b96d08595f45b3526cb4a Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Tue, 19 May 2015 15:33:48 -0700 Subject: Ruby C extension speedup: don't re-intern constant string needlessly. Also fixed lines with > 80 char length. --- ruby/ext/google/protobuf_c/defs.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'ruby/ext/google/protobuf_c/defs.c') diff --git a/ruby/ext/google/protobuf_c/defs.c b/ruby/ext/google/protobuf_c/defs.c index 9b590a55..e3341cca 100644 --- a/ruby/ext/google/protobuf_c/defs.c +++ b/ruby/ext/google/protobuf_c/defs.c @@ -34,8 +34,6 @@ // Common utilities. // ----------------------------------------------------------------------------- -const char* kDescriptorInstanceVar = "descriptor"; - static const char* get_str(VALUE str) { Check_Type(str, T_STRING); return RSTRING_PTR(str); @@ -1590,9 +1588,9 @@ VALUE Builder_add_message(VALUE _self, VALUE name) { * call-seq: * Builder.add_enum(name, &block) * - * Creates a new, empty enum descriptor with the given name, and invokes the block in - * the context of an EnumBuilderContext on that descriptor. The block can then - * call EnumBuilderContext#add_value to define the enum values. + * Creates a new, empty enum descriptor with the given name, and invokes the + * block in the context of an EnumBuilderContext on that descriptor. The block + * can then call EnumBuilderContext#add_value to define the enum values. * * This is the recommended, idiomatic way to build enum definitions. */ -- cgit v1.2.3