mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 15:57:43 +03:00
cext: put case statements on separate line
This seems to be the prevailing style, even though it is a bit more verbose for very simple switch statements. Differential Revision: https://phab.mercurial-scm.org/D909
This commit is contained in:
parent
a9a915a1bf
commit
5397128d04
@ -319,13 +319,20 @@ static Py_ssize_t jsonescapelen(const char *buf, Py_ssize_t len, bool paranoid)
|
||||
static char jsonescapechar2(char c)
|
||||
{
|
||||
switch (c) {
|
||||
case '\b': return 'b';
|
||||
case '\t': return 't';
|
||||
case '\n': return 'n';
|
||||
case '\f': return 'f';
|
||||
case '\r': return 'r';
|
||||
case '"': return '"';
|
||||
case '\\': return '\\';
|
||||
case '\b':
|
||||
return 'b';
|
||||
case '\t':
|
||||
return 't';
|
||||
case '\n':
|
||||
return 'n';
|
||||
case '\f':
|
||||
return 'f';
|
||||
case '\r':
|
||||
return 'r';
|
||||
case '"':
|
||||
return '"';
|
||||
case '\\':
|
||||
return '\\';
|
||||
}
|
||||
return '\0'; /* should not happen */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user