Skip to content

bpo-46670: Fix #ifdef WORDS_BIGENDIAN in audioop.c #31179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Modules/audioop.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ static const int stepsizeTable[89] = {
#define GETINT16(cp, i) GETINTX(int16_t, (cp), (i))
#define GETINT32(cp, i) GETINTX(int32_t, (cp), (i))

#if WORDS_BIGENDIAN
#ifdef WORDS_BIGENDIAN
#define GETINT24(cp, i) ( \
((unsigned char *)(cp) + (i))[2] + \
(((unsigned char *)(cp) + (i))[1] << 8) + \
Expand All @@ -314,7 +314,7 @@ static const int stepsizeTable[89] = {
#define SETINT16(cp, i, val) SETINTX(int16_t, (cp), (i), (val))
#define SETINT32(cp, i, val) SETINTX(int32_t, (cp), (i), (val))

#if WORDS_BIGENDIAN
#ifdef WORDS_BIGENDIAN
#define SETINT24(cp, i, val) do { \
((unsigned char *)(cp) + (i))[2] = (int)(val); \
((unsigned char *)(cp) + (i))[1] = (int)(val) >> 8; \
Expand Down