We mostly abide by this style.
In one case, a blank line was inserted to prevent a local
#include "file" from coming before a #include <file>.
quark |
hg-reviewers |
We mostly abide by this style.
In one case, a blank line was inserted to prevent a local
#include "file" from coming before a #include <file>.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/cext/bdiff.c (2 lines) | |||
M | mercurial/cext/dirs.c (1 line) | |||
M | mercurial/cext/manifest.c (2 lines) | |||
M | mercurial/cext/mpatch.c (2 lines) | |||
M | mercurial/cext/osutil.c (4 lines) | |||
M | mercurial/cext/parsers.c (2 lines) | |||
M | mercurial/cext/revlog.c (2 lines) |
/* | /* | ||||
bdiff.c - efficient binary diff extension for Mercurial | bdiff.c - efficient binary diff extension for Mercurial | ||||
Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> | Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> | ||||
This software may be used and distributed according to the terms of | This software may be used and distributed according to the terms of | ||||
the GNU General Public License, incorporated herein by reference. | the GNU General Public License, incorporated herein by reference. | ||||
Based roughly on Python difflib | Based roughly on Python difflib | ||||
*/ | */ | ||||
#define PY_SSIZE_T_CLEAN | #define PY_SSIZE_T_CLEAN | ||||
#include <Python.h> | #include <Python.h> | ||||
#include <limits.h> | |||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <limits.h> | |||||
#include "bdiff.h" | #include "bdiff.h" | ||||
#include "bitmanipulation.h" | #include "bitmanipulation.h" | ||||
#include "util.h" | #include "util.h" | ||||
static PyObject *blocks(PyObject *self, PyObject *args) | static PyObject *blocks(PyObject *self, PyObject *args) | ||||
{ | { |
/* | /* | ||||
dirs.c - dynamic directory diddling for dirstates | dirs.c - dynamic directory diddling for dirstates | ||||
Copyright 2013 Facebook | Copyright 2013 Facebook | ||||
This software may be used and distributed according to the terms of | This software may be used and distributed according to the terms of | ||||
the GNU General Public License, incorporated herein by reference. | the GNU General Public License, incorporated herein by reference. | ||||
*/ | */ | ||||
#define PY_SSIZE_T_CLEAN | #define PY_SSIZE_T_CLEAN | ||||
#include <Python.h> | #include <Python.h> | ||||
#include "util.h" | #include "util.h" | ||||
#ifdef IS_PY3K | #ifdef IS_PY3K | ||||
#define PYLONG_VALUE(o) ((PyLongObject *)o)->ob_digit[1] | #define PYLONG_VALUE(o) ((PyLongObject *)o)->ob_digit[1] | ||||
#else | #else | ||||
#define PYLONG_VALUE(o) PyInt_AS_LONG(o) | #define PYLONG_VALUE(o) PyInt_AS_LONG(o) | ||||
#endif | #endif | ||||
/* | /* | ||||
* manifest.c - manifest type that does on-demand parsing. | * manifest.c - manifest type that does on-demand parsing. | ||||
* | * | ||||
* Copyright 2015, Google Inc. | * Copyright 2015, Google Inc. | ||||
* | * | ||||
* This software may be used and distributed according to the terms of | * This software may be used and distributed according to the terms of | ||||
* the GNU General Public License, incorporated herein by reference. | * the GNU General Public License, incorporated herein by reference. | ||||
*/ | */ | ||||
#include <Python.h> | #include <Python.h> | ||||
#include <assert.h> | #include <assert.h> | ||||
#include <string.h> | |||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include <string.h> | |||||
#include "charencode.h" | #include "charencode.h" | ||||
#include "util.h" | #include "util.h" | ||||
#define DEFAULT_LINES 100000 | #define DEFAULT_LINES 100000 | ||||
typedef struct { | typedef struct { | ||||
char *start; | char *start; |
of the GNU General Public License, incorporated herein by reference. | of the GNU General Public License, incorporated herein by reference. | ||||
*/ | */ | ||||
#define PY_SSIZE_T_CLEAN | #define PY_SSIZE_T_CLEAN | ||||
#include <Python.h> | #include <Python.h> | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include "util.h" | |||||
#include "bitmanipulation.h" | #include "bitmanipulation.h" | ||||
#include "compat.h" | #include "compat.h" | ||||
#include "mpatch.h" | #include "mpatch.h" | ||||
#include "util.h" | |||||
static char mpatch_doc[] = "Efficient binary patching."; | static char mpatch_doc[] = "Efficient binary patching."; | ||||
static PyObject *mpatch_Error; | static PyObject *mpatch_Error; | ||||
static void setpyerr(int r) | static void setpyerr(int r) | ||||
{ | { | ||||
switch (r) { | switch (r) { | ||||
case MPATCH_ERR_NO_MEM: | case MPATCH_ERR_NO_MEM: |
/* | /* | ||||
osutil.c - native operating system services | osutil.c - native operating system services | ||||
Copyright 2007 Matt Mackall and others | Copyright 2007 Matt Mackall and others | ||||
This software may be used and distributed according to the terms of | This software may be used and distributed according to the terms of | ||||
the GNU General Public License, incorporated herein by reference. | the GNU General Public License, incorporated herein by reference. | ||||
*/ | */ | ||||
#define _ATFILE_SOURCE | #define _ATFILE_SOURCE | ||||
#include <Python.h> | #include <Python.h> | ||||
#include <errno.h> | |||||
#include <fcntl.h> | #include <fcntl.h> | ||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <errno.h> | |||||
#ifdef _WIN32 | #ifdef _WIN32 | ||||
#include <windows.h> | |||||
#include <io.h> | #include <io.h> | ||||
#include <windows.h> | |||||
#else | #else | ||||
#include <dirent.h> | #include <dirent.h> | ||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
#include <sys/stat.h> | #include <sys/stat.h> | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <unistd.h> | #include <unistd.h> | ||||
#ifdef HAVE_LINUX_STATFS | #ifdef HAVE_LINUX_STATFS | ||||
#include <linux/magic.h> | #include <linux/magic.h> |
/* | /* | ||||
parsers.c - efficient content parsing | parsers.c - efficient content parsing | ||||
Copyright 2008 Matt Mackall <mpm@selenic.com> and others | Copyright 2008 Matt Mackall <mpm@selenic.com> and others | ||||
This software may be used and distributed according to the terms of | This software may be used and distributed according to the terms of | ||||
the GNU General Public License, incorporated herein by reference. | the GNU General Public License, incorporated herein by reference. | ||||
*/ | */ | ||||
#include <Python.h> | #include <Python.h> | ||||
#include <ctype.h> | #include <ctype.h> | ||||
#include <stddef.h> | #include <stddef.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include "bitmanipulation.h" | |||||
#include "charencode.h" | #include "charencode.h" | ||||
#include "util.h" | #include "util.h" | ||||
#include "bitmanipulation.h" | |||||
#ifdef IS_PY3K | #ifdef IS_PY3K | ||||
/* The mapping of Python types is meant to be temporary to get Python | /* The mapping of Python types is meant to be temporary to get Python | ||||
* 3 to compile. We should remove this once Python 3 support is fully | * 3 to compile. We should remove this once Python 3 support is fully | ||||
* supported and proper types are used in the extensions themselves. */ | * supported and proper types are used in the extensions themselves. */ | ||||
#define PyInt_Check PyLong_Check | #define PyInt_Check PyLong_Check | ||||
#define PyInt_FromLong PyLong_FromLong | #define PyInt_FromLong PyLong_FromLong | ||||
#define PyInt_FromSsize_t PyLong_FromSsize_t | #define PyInt_FromSsize_t PyLong_FromSsize_t |
/* | /* | ||||
parsers.c - efficient content parsing | parsers.c - efficient content parsing | ||||
Copyright 2008 Matt Mackall <mpm@selenic.com> and others | Copyright 2008 Matt Mackall <mpm@selenic.com> and others | ||||
This software may be used and distributed according to the terms of | This software may be used and distributed according to the terms of | ||||
the GNU General Public License, incorporated herein by reference. | the GNU General Public License, incorporated herein by reference. | ||||
*/ | */ | ||||
#include <Python.h> | #include <Python.h> | ||||
#include <assert.h> | #include <assert.h> | ||||
#include <ctype.h> | #include <ctype.h> | ||||
#include <stddef.h> | #include <stddef.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include "bitmanipulation.h" | |||||
#include "charencode.h" | #include "charencode.h" | ||||
#include "util.h" | #include "util.h" | ||||
#include "bitmanipulation.h" | |||||
#ifdef IS_PY3K | #ifdef IS_PY3K | ||||
/* The mapping of Python types is meant to be temporary to get Python | /* The mapping of Python types is meant to be temporary to get Python | ||||
* 3 to compile. We should remove this once Python 3 support is fully | * 3 to compile. We should remove this once Python 3 support is fully | ||||
* supported and proper types are used in the extensions themselves. */ | * supported and proper types are used in the extensions themselves. */ | ||||
#define PyInt_Check PyLong_Check | #define PyInt_Check PyLong_Check | ||||
#define PyInt_FromLong PyLong_FromLong | #define PyInt_FromLong PyLong_FromLong | ||||
#define PyInt_FromSsize_t PyLong_FromSsize_t | #define PyInt_FromSsize_t PyLong_FromSsize_t |