summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2003-05-29 21:55:41 (GMT)
committerGreg Ward <gward@python.net>2003-05-29 21:55:41 (GMT)
commit38c9266f4203d5d01a0c76f649ff5ba7840afbe1 (patch)
treea306768f3e1d1cc35f5f01a8655ef5814453b8ab /Modules
parentd676906ab7e0bda29da776a7ef384e1f751c3f27 (diff)
downloadcpython-38c9266f4203d5d01a0c76f649ff5ba7840afbe1.zip
cpython-38c9266f4203d5d01a0c76f649ff5ba7840afbe1.tar.gz
cpython-38c9266f4203d5d01a0c76f649ff5ba7840afbe1.tar.bz2
Change _ssize() so it doesn't rely on sizeof(char) or sizeof(short):
8 bits is 1 byte, and that isn't about to change any time soon. (I hope!)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/ossaudiodev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c
index 7b9feae..5df1d1a 100644
--- a/Modules/ossaudiodev.c
+++ b/Modules/ossaudiodev.c
@@ -554,13 +554,13 @@ _ssize(oss_audio_t *self, int *nchannels, int *ssize)
case AFMT_A_LAW:
case AFMT_U8:
case AFMT_S8:
- *ssize = sizeof(char);
+ *ssize = 1; /* 8 bit formats: 1 byte */
break;
case AFMT_S16_LE:
case AFMT_S16_BE:
case AFMT_U16_LE:
case AFMT_U16_BE:
- *ssize = sizeof(short);
+ *ssize = 2; /* 16 bit formats: 1 byte */
break;
case AFMT_MPEG:
case AFMT_IMA_ADPCM: