cpython: ccffce2dde49 (original) (raw)

Mercurial > cpython

changeset 83983:ccffce2dde49

Issue #18084: Use sys.byteorder in wave.py. Original patch by Hideaki Takahashi. [#18084]

Serhiy Storchaka storchaka@gmail.com
date Wed, 29 May 2013 23:38:00 +0300
parents bcaaaa00425b
children 18ef35afc55d
files Lib/wave.py Misc/ACKS
diffstat 2 files changed, 4 insertions(+), 8 deletions(-)[+] [-] Lib/wave.py 11 Misc/ACKS 1

line wrap: on

line diff

--- a/Lib/wave.py +++ b/Lib/wave.py @@ -82,13 +82,8 @@ WAVE_FORMAT_PCM = 0x0001 _array_fmts = None, 'b', 'h', None, 'l' -# Determine endian-ness import struct -if struct.pack("h", 1) == b"\000\001":

-else:

- +import sys from chunk import Chunk from collections import namedtuple @@ -235,7 +230,7 @@ class Wave_read: self._data_seek_needed = 0 if nframes == 0: return b''

@@ -422,7 +417,7 @@ class Wave_write: nframes = len(data) // (self._sampwidth * self._nchannels) if self._convert: data = self._convert(data)

--- a/Misc/ACKS +++ b/Misc/ACKS @@ -1222,6 +1222,7 @@ Thenault Sylvain Péter Szabó Amir Szekely Arfrever Frehtes Taifersar Arahesis +Hideaki Takahashi Neil Tallim Geoff Talvola Musashi Tamura