Mercurial > hg
annotate contrib/fuzz/pyutil.h @ 47476:f23eafb036af
dirstate-v2: Use 32-bit integers instead of 64-bit for offsets
This saves 12 bytes per node. (Nodes representing files or directories.)
These are offsets to other parts of the file. This would only be a limitation
for a `.hg/dirstate` file larger than 4 GiB, which would only happen for a
repository with dozens of millions of files and directories.
Differential Revision: https://phab.mercurial-scm.org/D10920
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Mon, 28 Jun 2021 15:41:50 +0200 |
parents | 8766728dbce6 |
children |
rev | line source |
---|---|
41013
ef103c96ed33
fuzz: extract Python initialization to utility package
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
1 #include <Python.h> |
ef103c96ed33
fuzz: extract Python initialization to utility package
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
2 |
43859
8766728dbce6
fuzz: add support for fuzzing under either Python 2 or 3
Augie Fackler <augie@google.com>
parents:
41013
diff
changeset
|
3 #if PY_MAJOR_VERSION >= 3 |
8766728dbce6
fuzz: add support for fuzzing under either Python 2 or 3
Augie Fackler <augie@google.com>
parents:
41013
diff
changeset
|
4 #define PYCODETYPE PyObject |
8766728dbce6
fuzz: add support for fuzzing under either Python 2 or 3
Augie Fackler <augie@google.com>
parents:
41013
diff
changeset
|
5 #else |
8766728dbce6
fuzz: add support for fuzzing under either Python 2 or 3
Augie Fackler <augie@google.com>
parents:
41013
diff
changeset
|
6 #define PYCODETYPE PyCodeObject |
8766728dbce6
fuzz: add support for fuzzing under either Python 2 or 3
Augie Fackler <augie@google.com>
parents:
41013
diff
changeset
|
7 #endif |
8766728dbce6
fuzz: add support for fuzzing under either Python 2 or 3
Augie Fackler <augie@google.com>
parents:
41013
diff
changeset
|
8 |
41013
ef103c96ed33
fuzz: extract Python initialization to utility package
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
9 namespace contrib |
ef103c96ed33
fuzz: extract Python initialization to utility package
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
10 { |
ef103c96ed33
fuzz: extract Python initialization to utility package
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
11 |
ef103c96ed33
fuzz: extract Python initialization to utility package
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
12 void initpy(const char *cselfpath); |
ef103c96ed33
fuzz: extract Python initialization to utility package
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
13 PyObject *pyglobals(); |
ef103c96ed33
fuzz: extract Python initialization to utility package
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
14 |
ef103c96ed33
fuzz: extract Python initialization to utility package
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
15 } /* namespace contrib */ |