mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-30 23:14:13 +03:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
1b567c5f66
commit
44d70b8b25
|
@ -9,6 +9,7 @@ The contents of this file are hereby released in the public domain (CC0)
|
||||||
Full text of the CC0 license:
|
Full text of the CC0 license:
|
||||||
https://creativecommons.org/publicdomain/zero/1.0/
|
https://creativecommons.org/publicdomain/zero/1.0/
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import struct
|
import struct
|
||||||
|
|
|
@ -31,12 +31,12 @@ typedef struct {
|
||||||
|
|
||||||
#define BIT_MASK(bit_count) ((1 << (bit_count)) - 1)
|
#define BIT_MASK(bit_count) ((1 << (bit_count)) - 1)
|
||||||
#define SET_BITS(target, bit_offset, bit_count, value) \
|
#define SET_BITS(target, bit_offset, bit_count, value) \
|
||||||
target |= (((value)&BIT_MASK(bit_count)) << (bit_offset))
|
target |= (((value) & BIT_MASK(bit_count)) << (bit_offset))
|
||||||
#define GET_BITS(source, bit_offset, bit_count) \
|
#define GET_BITS(source, bit_offset, bit_count) \
|
||||||
((source) & (BIT_MASK(bit_count) << (bit_offset))) >> (bit_offset)
|
((source) & (BIT_MASK(bit_count) << (bit_offset))) >> (bit_offset)
|
||||||
#define SWAP(TYPE, A, B) \
|
#define SWAP(TYPE, A, B) \
|
||||||
do { \
|
do { \
|
||||||
TYPE TMP = A; \
|
TYPE TMP = A; \
|
||||||
(A) = B; \
|
(A) = B; \
|
||||||
(B) = TMP; \
|
(B) = TMP; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
|
@ -15,8 +15,6 @@
|
||||||
|
|
||||||
#include "Bcn.h"
|
#include "Bcn.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define LOAD16(p) (p)[0] | ((p)[1] << 8)
|
#define LOAD16(p) (p)[0] | ((p)[1] << 8)
|
||||||
|
|
||||||
#define LOAD32(p) (p)[0] | ((p)[1] << 8) | ((p)[2] << 16) | ((p)[3] << 24)
|
#define LOAD32(p) (p)[0] | ((p)[1] << 8) | ((p)[2] << 16) | ((p)[3] << 24)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user