summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string.c b/string.c
index fb8be9dca4..83ac1e486c 100644
--- a/string.c
+++ b/string.c
@@ -856,7 +856,7 @@ rb_str_hash(str)
register char *p = RSTRING(str)->ptr;
register int key = 0;
-#ifdef HASH_ELFHASH
+#if defined(HASH_ELFHASH)
register unsigned int g;
while (len--) {
@@ -865,7 +865,7 @@ rb_str_hash(str)
key ^= g >> 24;
key &= ~g;
}
-#elif HASH_PERL
+#elif defined(HASH_PERL)
while (len--) {
key += *p++;
key += (key << 10);