Tim Peters
72270c220e
Repaired error in new comment.
2006-05-31 15:34:37 +00:00
Tim Peters
d6a6f023c8
_range_error(): Speed and simplify (there's no real need for
...
loops here). Assert that size_t is actually big enough, and
that f->size is at least one. Wrap a long line.
2006-05-31 15:33:22 +00:00
Tim Peters
c2b550e16e
Trimmed trailing whitespace.
2006-05-31 14:28:07 +00:00
Thomas Heller
bd16bce81f
PyTuple_Pack is not available in Python 2.3, but ctypes must stay
...
compatible with that.
2006-05-31 11:37:58 +00:00
Neal Norwitz
971ea11e4c
Calculate smallest properly (it was off by one) and use proper ssize_t types for Win64
2006-05-31 07:43:27 +00:00
Bob Ippolito
4182a75571
Change wrapping terminology to overflow masking
2006-05-30 17:37:54 +00:00
Neal Norwitz
1e44ca94ac
Simplify further by using AddStringConstant
2006-05-30 03:18:50 +00:00
Bob Ippolito
2fd3977a9d
struct: modulo math plus warning on all endian-explicit formats for compatibility with older struct usage (ugly)
2006-05-29 22:55:48 +00:00
Georg Brandl
a355c14fa1
Whoops.
2006-05-29 22:00:30 +00:00
Georg Brandl
bf92f46572
Convert more modules to METH_VARARGS.
2006-05-29 21:58:42 +00:00
Georg Brandl
96a8c3954c
Make use of METH_O and METH_NOARGS where possible.
...
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
2006-05-29 21:04:52 +00:00
Georg Brandl
2cfaa34dfa
Correct some value converting strangenesses.
2006-05-29 19:39:45 +00:00
Armin Rigo
162997efb1
Silence a warning.
2006-05-29 17:59:47 +00:00
Bob Ippolito
28b2686260
simplify the struct code a bit (no functional changes)
2006-05-29 15:47:29 +00:00
Georg Brandl
bda0744d55
Convert fmmodule to METH_VARARGS.
2006-05-29 13:53:16 +00:00
Nick Coghlan
c649ec5b69
Apply modified version of Collin Winter's patch #1478788
...
Renames functional extension module to _functools and adds a Python
functools module so that utility functions like update_wrapper can be
added easily.
2006-05-29 12:43:05 +00:00
Georg Brandl
c7c51147c7
Fix refleak in socketmodule. Replace bogus Py_BuildValue calls.
...
Fix refleak in exceptions.
2006-05-29 09:46:51 +00:00
Georg Brandl
964f5978dc
METH_NOARGS functions do get called with two args.
2006-05-28 22:38:57 +00:00
Georg Brandl
660222f955
Convert audioop over to METH_VARARGS.
2006-05-28 22:34:51 +00:00
Georg Brandl
fbef5888e7
Fix C function calling conventions in _sre module.
2006-05-28 22:14:04 +00:00
Georg Brandl
c26025c562
Fix ref-antileak in _struct.c which eventually lead to deallocating None.
2006-05-28 21:42:54 +00:00
Bob Ippolito
cd51ca5b11
fix struct regression on 64-bit platforms
2006-05-27 15:53:49 +00:00
Jack Diederich
2d40077b4f
needforspeed: use PyObject_MALLOC instead of system malloc for small
...
allocations. Use PyMem_MALLOC for larger (1k+) chunks. 1%-2% speedup.
2006-05-27 15:44:34 +00:00
Richard Jones
7b9558d37d
Conversion of exceptions over from faked-up classes to new-style C types.
2006-05-27 12:29:24 +00:00
Bob Ippolito
1fcdc232db
Fix up struct docstrings, add struct.pack_to function for symmetry
2006-05-27 12:11:36 +00:00
Bob Ippolito
90bd0a554e
Remove the range checking and int usage #defines from _struct and strip out the now-dead code
2006-05-27 11:47:12 +00:00
Martin v. Löwis
d532ba0746
Explain why 'consumed' is initialized.
2006-05-27 08:54:29 +00:00
Martin v. Löwis
d004fc810a
Patch 1494554: Update numeric properties to Unicode 4.1.
2006-05-27 08:36:52 +00:00
Neal Norwitz
2f3136b8f0
Fix compiler warning (and whitespace) on Mac OS 10.4. (A lot of this code looked duplicated, I wonder if a utility function could help reduce the duplication here.)
2006-05-27 05:18:57 +00:00
Bob Ippolito
aa70a17e13
enable all of the struct tests, use ssize_t, fix some whitespace
2006-05-26 20:25:23 +00:00
Georg Brandl
7784f12d74
Replace Py_BuildValue("OO") by PyTuple_Pack.
2006-05-26 20:04:44 +00:00
Tim Peters
735ae484f0
Repair Windows compiler warnings about mixing
...
signed and unsigned integral types in comparisons.
2006-05-26 16:49:28 +00:00
Bob Ippolito
0cbf2c5785
fix signed/unsigned mismatch in struct
2006-05-26 16:23:28 +00:00
Bob Ippolito
1d2b0e3f61
Enable PY_USE_INT_WHEN_POSSIBLE in struct
2006-05-26 14:29:35 +00:00
Bob Ippolito
685dda8b95
Fix _struct typo that broke some 64-bit platforms
2006-05-26 14:23:21 +00:00
Bob Ippolito
ad647859f4
Fix distutils so that libffi will cross-compile between darwin/x86 and darwin/ppc
2006-05-26 14:07:23 +00:00
Bob Ippolito
e27337b5d0
fix #1229380 No struct.pack exception for some out of range integers
2006-05-26 13:15:44 +00:00
Martin Blais
2856e5f390
Support for buffer protocol for socket and struct.
...
* Added socket.recv_buf() and socket.recvfrom_buf() methods, that use the buffer
protocol (send and sendto already did).
* Added struct.pack_to(), that is the corresponding buffer compatible method to
unpack_from().
* Fixed minor typos in arraymodule.
2006-05-26 12:03:27 +00:00
Jack Diederich
6c433a91d5
use Py_ssize_t in places that may need it
2006-05-26 11:15:17 +00:00
Tim Peters
c285e62d76
Repair idiot typo, and complete the job of trying to
...
use the Windows time.clock() implementation on Win64.
2006-05-25 22:25:25 +00:00
Brett Cannon
4c803f1c81
Move over to use of METH_O and METH_NOARGS.
2006-05-25 22:00:14 +00:00
Bob Ippolito
45c6472f99
Add missing files from x86 darwin ctypes patch
2006-05-25 21:58:05 +00:00
Tim Peters
7a822dabad
Some Win64 pre-release in 2000 didn't support
...
QueryPerformanceCounter(), but we believe Win64 does
support it now. So use in time.clock().
It would be peachy if someone with a Win64 box tried
this ;-)
2006-05-25 21:50:17 +00:00
Ronald Oussoren
f5bc414334
Fix minor typo in prep_cif.c
2006-05-25 21:30:54 +00:00
Bob Ippolito
964e02a901
fix test_float regression and 64-bit size mismatch issue
2006-05-25 21:09:45 +00:00
Bob Ippolito
66c0935d67
enable darwin/x86 support for libffi and hence ctypes (doesn't yet support --enable-universalsdk)
2006-05-25 19:59:56 +00:00
Bob Ippolito
a99865b12e
Use faster struct pack/unpack functions for the endian table that matches the host's
2006-05-25 19:56:56 +00:00
Bob Ippolito
04ab994dca
Use LONG_MIN and LONG_MAX to check Python integer bounds instead of the incorrect INT_MIN and INT_MAX
2006-05-25 19:33:38 +00:00
Georg Brandl
684fd0c8ec
Replace PyObject_CallFunction calls with only object args
...
with PyObject_CallFunctionObjArgs, which is 30% faster.
2006-05-25 19:15:31 +00:00
Bob Ippolito
3b0cae9cc0
fix a struct regression where long would be returned for short unsigned integers
2006-05-25 19:15:27 +00:00