Commit Graph

49 Commits

Author SHA1 Message Date
Mark Hammond fe51c6d66e Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototype
for Py_Main().

Thanks to Kalle Svensson and Skip Montanaro for the patches.
2002-08-02 02:27:13 +00:00
Martin v. Löwis 43b936d08c Patch #477750: Use METH_ constants in Modules. 2002-01-17 23:15:58 +00:00
Tim Peters eb4b7bad33 audioop_ratecv() again: settle for a sloppier upper bound that's less
obnoxious to compute and easier to explain.  No compromise on safety.
2001-12-07 00:37:39 +00:00
Tim Peters 3127c28b3f audioop_ratecv(): I left a potentially unsafe multiply unchecked
yesterday -- repair that.  Also renamed the silly size_times_nchannels
to bytes_per_frame.
2001-12-05 22:30:21 +00:00
Tim Peters 1691bd9f1e SF bug 482574: audioop.ratecv crashes.
Bugfix candidate.
A numerically naive computation of output buffer size caused crashes
and spurious MemoryErrors for reasonable arguments.
audioop_ratecv():  Avoid spurious overflow by careful reworking of the
buffer size computations, triggering MemoryError if and only if the
final buffer size can't be represented in a C int (although
PyString_FromStringAndSize may legitimately raise MemoryError even if
it does fit in a C int).  All reasonable arguments should work as
intended now, and all unreasonable arguments should be cuaght.
2001-12-05 06:05:07 +00:00
Guido van Rossum 8586991099 REMOVED all CWI, CNRI and BeOpen copyright markings.
This should match the situation in the 1.6b1 tree.
2000-09-01 23:29:29 +00:00
Fred Drake c818d5347e Remove one compiler warning found with -Wstrict-prototypes. 2000-08-31 05:07:19 +00:00
Moshe Zadka 6a078edb07 Removing warnings discovered by gcc -Wall 2000-08-04 15:53:06 +00:00
Peter Schneider-Kamp 7e01890986 merge Include/my*.h into Include/pyport.h
marked my*.h as obsolete
2000-07-31 15:28:04 +00:00
Thomas Wouters f3f33dcf03 Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',
and a couple of functions that were missed in the previous batches. Not
terribly tested, but very carefully scrutinized, three times.

All these were found by the little findkrc.py that I posted to python-dev,
which means there might be more lurking. Cases such as this:

long
func(a, b)
	long a;
	long b; /* flagword */
{

and other cases where the last ; in the argument list isn't followed by a
newline and an opening curly bracket. Regexps to catch all are welcome, of
course ;)
2000-07-21 06:00:07 +00:00
Peter Schneider-Kamp 8bc8f0d036 ANSI-fication 2000-07-10 17:15:07 +00:00
Guido van Rossum ffcc3813d8 Change copyright notice - 2nd try. 2000-06-30 23:58:06 +00:00
Guido van Rossum fd71b9e9d4 Change copyright notice. 2000-06-30 23:50:40 +00:00
Guido van Rossum 7d64b48eaf Disable the ZEROTRAP code -- this turns a 0 byte into a 2 byte and I
don't think that's what we want.  There was some brief discussion
of this somewhere but I don't recall where.
2000-05-02 21:18:13 +00:00
Guido van Rossum 43713e5a28 Massive patch by Skip Montanaro to add ":name" to as many
PyArg_ParseTuple() format string arguments as possible.
2000-02-29 13:59:29 +00:00
Guido van Rossum 65bb328f67 Fixed memory leak in ratecv, in response to PR#72. By Sjoerd Mullender. 1999-09-07 14:24:05 +00:00
Guido van Rossum 3886bb6997 Add DL_EXPORT() to all modules that could possibly be used
on BeOS or Windows.
1998-12-04 18:50:17 +00:00
Guido van Rossum 690119621e Purported fixes for 64-bit platforms with help from John Jorgensen 1998-04-23 20:23:00 +00:00
Guido van Rossum 6345ac6d61 Add cast to realloc/malloc call to shut up AIX compiler. (Vladimir Marangozov) 1997-10-31 20:32:13 +00:00
Guido van Rossum 0cb96de269 Apply two changes, systematically:
(1) Use PyErr_NewException("module.class", NULL, NULL) to create the
    exception object.

(2) Remove all calls to Py_FatalError(); instead, return or
    ignore the errors -- the import code now checks PyErr_Occurred()
    after calling a module's init function, so it's no longer a
    fatal error for the initialization to fail.

Also did some small cleanups, e.g. removed unnecessary test for
"already initialized" from initfpectl(), and unified
initposix()/initnt().

I haven't checked this very thoroughly, so while the changes are
pretty trivial -- beware of untested code!
1997-10-01 04:29:29 +00:00
Guido van Rossum 3bbeb7a318 Fix by Sjoerd: don't want to resize to zero length. 1997-09-22 16:14:27 +00:00
Guido van Rossum b24c9ea514 fixed ratecv to continue working if product of rates is bigger than 32 bits
(Sjoerd)
1997-05-20 15:59:35 +00:00
Guido van Rossum 644a12b00c Tweaks to keep the Microsoft compiler quier. 1997-04-09 19:24:53 +00:00
Guido van Rossum 1851a67695 Changes by Sjoerd (reformatted).
add(): better handling of overflow (substitute maxval instead of
throwing away higher order bits).

ratecv(): some bugfixes, Sjoerd says.
1997-02-14 16:14:03 +00:00
Roger E. Masse c905fffa15 Added Sjoerd's submitted 'ratecv' method. Made corrections for new names.
Reindented.
1997-01-17 18:12:04 +00:00
Roger E. Masse eaa6e1102f Renamed, reindented. (was already partially complete) 1997-01-03 19:26:27 +00:00
Guido van Rossum a376cc5cc8 Keep gcc -Wall happy. 1996-12-05 23:43:35 +00:00
Guido van Rossum d266eb460e New permission notice, includes CNRI. 1996-10-25 14:44:06 +00:00
Guido van Rossum a320fd308c changes for MPW 1995-03-09 12:14:15 +00:00
Guido van Rossum cd938fc5a1 Made some more things static, and other cleanup for new naming scheme 1995-01-17 16:13:48 +00:00
Guido van Rossum 524b588553 Added 1995 to copyright message.
Setup.in: clarified Tk comments somewhat.
structmodule.c: use memcpy() instead of double precision assignment.
1995-01-04 19:10:35 +00:00
Guido van Rossum 3bbc62e9c2 Another bulky set of minor changes.
Note addition of gethostbyaddr() and improved repr() for sockets,
renaming of md5.md5() to md5.new(), and fixing of leaks in threads.
1995-01-02 19:30:30 +00:00
Sjoerd Mullender a142613678 Added minmax function. 1994-09-06 16:19:33 +00:00
Guido van Rossum 7b1e974b4b Makefile.pre.in: add $(OPT) to link command
audioop.c: fix for MPW
config.c.in: save original argc/argv for Lance
rotormodule.c: new coding conventions
timemodule.c: add casts for Lance
1994-08-29 10:46:42 +00:00
Guido van Rossum b6775db241 Merge alpha100 branch back to main trunk 1994-08-01 11:34:53 +00:00
Sjoerd Mullender c4801ed513 Added minmax function:
-- function of module audioop: minmax (FRAGMENT, WIDTH)
    Minmax returns a tuple consisting of the minimum and maximum
    values of all samples in the sound fragment.
1993-12-13 12:06:27 +00:00
Jack Jansen 337b20e23e Added audioop.reverse() which reverses an audio sample 1993-02-23 13:39:57 +00:00
Jack Jansen a90805f1c0 This time really check in the new routines :-) 1993-02-17 14:29:28 +00:00
Jack Jansen dd8a6eac57 Added lin2lin, findmax, findfactor and fintfit routines 1993-02-17 14:21:09 +00:00
Sjoerd Mullender 38a22baea9 Fixed some memory leaks when things go wrong. 1993-02-10 13:31:01 +00:00
Jack Jansen 55cea47bae Changed adpcm routines to use 2-element state (was 3 element) 1993-02-10 13:21:59 +00:00
Guido van Rossum 34679b7661 * Added Fixcprt.py: script to fix copyright message.
* various modules: added 1993 to copyright.
* thread.c: added copyright notice.
* ceval.c: minor change to error message for "+"
* stdwinmodule.c: check for error from wfetchcolor
* config.c: MS-DOS fixes (define PYTHONPATH, use DELIM, use osdefs.h)
* Add declaration of inittab to import.h
* sysmodule.c: added sys.builtin_module_names
* xxmodule.c, xxobject.c: fix minor errors
1993-01-26 13:33:44 +00:00
Jack Jansen d513f0bcb6 Fixed various bugs in the adpcm routines 1993-01-08 14:40:53 +00:00
Jack Jansen e1b4d7ce14 Added rms, maxpp and avgpp methods. 1992-08-24 14:36:31 +00:00
Guido van Rossum b64e63545f Added conversions to/from ADPCM(-4); renamed adpcm to adpcm3 (what it
really was).
1992-07-06 14:21:56 +00:00
Guido van Rossum 8e7a0f026e Added adpcm2lin and lin2adpcm. 1992-06-23 15:23:57 +00:00
Guido van Rossum aad5344fc1 Fix bug in ulaw2lin for 4-byte values 1992-06-05 15:11:56 +00:00
Guido van Rossum f0476350b8 Added 1992 to copyright notice 1992-06-03 17:07:06 +00:00
Guido van Rossum b66efa0d75 Initial revision 1992-06-01 16:01:24 +00:00