about summary refs log tree commit homepage
path: root/ext/unicorn_http/global_variables.h
diff options
context:
space:
mode:
authorEric Wong <bofh@yhbt.net>2021-10-22 04:05:16 +0000
committerEric Wong <bofh@yhbt.net>2021-10-24 09:54:28 +0000
commitd60372b5c3ba517f1015b93912824e0675a4326d (patch)
tree12b01ef085635a8c859d55d032439c82ee734b68 /ext/unicorn_http/global_variables.h
parent158e9aad11ee2ed7dc01182da150e803f7cdbfef (diff)
downloadunicorn-d60372b5c3ba517f1015b93912824e0675a4326d.tar.gz
Most of these are bound to be used in Rack/Rails/apps/gems,
(though possibly with different encodings).  Give Ruby
a chance to deduplicate them, at least.
Diffstat (limited to 'ext/unicorn_http/global_variables.h')
-rw-r--r--ext/unicorn_http/global_variables.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/unicorn_http/global_variables.h b/ext/unicorn_http/global_variables.h
index f8e694c..c9ceebd 100644
--- a/ext/unicorn_http/global_variables.h
+++ b/ext/unicorn_http/global_variables.h
@@ -55,7 +55,7 @@ NORETURN(static void parser_raise(VALUE klass, const char *));
 
 /** Defines global strings in the init method. */
 #define DEF_GLOBAL(N, val) do { \
-  g_##N = rb_obj_freeze(rb_str_new(val, sizeof(val) - 1)); \
+  g_##N = str_new_dd_freeze(val, (long)sizeof(val) - 1); \
   rb_gc_register_mark_object(g_##N); \
 } while (0)