aboutsummaryrefslogtreecommitdiffhomepage
path: root/ruby/ext/google/protobuf_c/defs.c
diff options
context:
space:
mode:
authorGravatar Chris Fallin <cfallin@google.com>2015-05-19 15:33:48 -0700
committerGravatar Chris Fallin <cfallin@google.com>2015-05-19 16:19:00 -0700
commit231886f6327b7cad480b96d08595f45b3526cb4a (patch)
treea20711cf778f1f0d516d4648991a997963fe24f9 /ruby/ext/google/protobuf_c/defs.c
parenta8b38c598d7f65b281a72809b28117afdb760931 (diff)
Ruby C extension speedup: don't re-intern constant string needlessly.
Also fixed lines with > 80 char length.
Diffstat (limited to 'ruby/ext/google/protobuf_c/defs.c')
-rw-r--r--ruby/ext/google/protobuf_c/defs.c8
1 files changed, 3 insertions, 5 deletions
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.
*/