Patchwork [05,of,11] cext: mark tuple_format as a constant

login
register
mail settings
Submitter Yuya Nishihara
Date March 3, 2018, 1:27 p.m.
Message ID <a04953df1a93b64c199c.1520083658@mimosa>
Download mbox | patch
Permalink /patch/28770/
State Accepted
Headers show

Comments

Yuya Nishihara - March 3, 2018, 1:27 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1520077312 18000
#      Sat Mar 03 06:41:52 2018 -0500
# Node ID a04953df1a93b64c199ce7be8f2237c225b49de3
# Parent  fd5992aca7c15c920be1b513ee3717c0f5a970a2
cext: mark tuple_format as a constant

Just for clarity.

Patch

diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c
+++ b/mercurial/cext/revlog.c
@@ -87,9 +87,9 @@  static const char nullid[20];
 static Py_ssize_t inline_scan(indexObject *self, const char **offsets);
 
 #if LONG_MAX == 0x7fffffffL
-static char *tuple_format = PY23("Kiiiiiis#", "Kiiiiiiy#");
+static const char *const tuple_format = PY23("Kiiiiiis#", "Kiiiiiiy#");
 #else
-static char *tuple_format = PY23("kiiiiiis#", "kiiiiiiy#");
+static const char *const tuple_format = PY23("kiiiiiis#", "kiiiiiiy#");
 #endif
 
 /* A RevlogNG v1 index entry is 64 bytes long. */