From eeaf1ef970a09cf8f77cff438fa7bcc004798295 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 24 Jul 2010 15:29:11 +0200 Subject: [PATCH] Constify read-only global data Also silences a compiler warning about deprecated conversion from const char* to char*. --- src/node_buffer.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/node_buffer.cc b/src/node_buffer.cc index efd01b716..226baf7aa 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -272,10 +272,10 @@ Handle Buffer::Utf8Slice(const Arguments &args) { return scope.Close(string); } -static char* base64_table = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789+/"; -static int unbase64_table[] = +static const char *base64_table = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789+/"; +static const int unbase64_table[] = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63