Commit Graph

11 Commits

Author SHA1 Message Date
Felix Schwarz c350c1b36d include unistd.h in _chunker.c
With Python 3.13, Python.h no longer includes the <unistd.h> standard header file:
https://docs.python.org/3.13/whatsnew/3.13.html#id8
2023-11-05 11:48:16 +01:00
Thomas Waldmann cc7984f423 _chunker.c: fix warnings on macOS
macOS does not have POSIX_FADV_DONTNEED, thus some variables are not
needed.
2022-08-04 10:46:36 +02:00
Nick Cleaton 708fa83c1d chunker speedup and regression test 2019-11-28 20:59:02 +00:00
Thomas Waldmann a3cecf599f add parens for C preprocessor macro argument usages
this is needed for correctness because the preprocessor is just
doing text replacement.

This is the correct way:

#define MUL(x, y) ((x) * (y))

MUL(1+2, 3-4) -> ((1+2) * (3-4))    # not: (1+2 * 3-4)

I didn't put parens around all arg usages for readability.

Some stuff (like index) is not expected to be an expression.

Also, when a arg is only used in another macro or function call,
no parens are needed either.

I reviewed the code: no harm was done (yet) due to this fault.

Thanks to @rciorba who found this.
2017-12-13 04:01:59 +01:00
Marian Beermann b1b66be593 fix chunker holding the GIL during blocking I/O 2017-07-29 11:58:01 +02:00
Marian Beermann 944a4abd58 chunker: don't do uint32_t >> 32 2017-06-13 11:42:43 +02:00
Marian Beermann 3f8a0221ee Revert "move chunker to borg.algorithms"
This reverts commit 956b50b29c.

# Conflicts:
#	setup.py
#	src/borg/archive.py
#	src/borg/helpers.py
2017-06-07 23:51:42 +02:00
Marian Beermann 956b50b29c move chunker to borg.algorithms 2017-05-02 19:15:01 +02:00
Thomas Waldmann 045e5a1203 Merge branch 'master' into move-to-src 2016-05-30 19:38:16 +02:00
Thomas Waldmann 3ce35f6843 Merge branch 'master' into move-to-src 2016-05-21 19:06:01 +02:00
Thomas Waldmann d1ea925a5b move borg package to src/ 2016-05-05 20:19:50 +02:00
Renamed from borg/_chunker.c (Browse further)