Skip to content

Commit

Permalink
modplug: add patch to remove the deprecated register keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Sep 26, 2023
1 parent f382808 commit 101e12c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/build/libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
[
'--disable-shared', '--enable-static',
],
patches='src/lib/modplug/patches',
)

libopenmpt = AutotoolsProject(
Expand Down
22 changes: 22 additions & 0 deletions src/lib/modplug/patches/no_register
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Index: libmodplug-0.8.9.0/src/fastmix.cpp
===================================================================
--- libmodplug-0.8.9.0.orig/src/fastmix.cpp
+++ libmodplug-0.8.9.0/src/fastmix.cpp
@@ -288,7 +288,7 @@ CzWINDOWEDFIR sfir;
// MIXING MACROS
// ----------------------------------------------------------------------------
#define SNDMIX_BEGINSAMPLELOOP8\
- register MODCHANNEL * const pChn = pChannel;\
+ MODCHANNEL * const pChn = pChannel;\
nPos = pChn->nPosLo;\
const signed char *p = (signed char *)(pChn->pCurrentSample+pChn->nPos);\
if (pChn->dwFlags & CHN_STEREO) p += pChn->nPos;\
@@ -296,7 +296,7 @@ CzWINDOWEDFIR sfir;
do {

#define SNDMIX_BEGINSAMPLELOOP16\
- register MODCHANNEL * const pChn = pChannel;\
+ MODCHANNEL * const pChn = pChannel;\
nPos = pChn->nPosLo;\
const signed short *p = (signed short *)(pChn->pCurrentSample+(pChn->nPos*2));\
if (pChn->dwFlags & CHN_STEREO) p += pChn->nPos;\
1 change: 1 addition & 0 deletions src/lib/modplug/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
no_register

0 comments on commit 101e12c

Please sign in to comment.