Martin v. Löwis
6819210b9e
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
...
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
2007-07-21 06:55:02 +00:00
Neal Norwitz
a84dcd7546
Stop using METH_OLDARGS implicitly
2007-05-22 07:16:44 +00:00
Kristján Valur Jónsson
67387fb4aa
Make pythoncore compile cleanly with VisualStudio 2005. Used an explicit typecast to get a 64 bit integer, and undefined the Yield macro that conflicts with winbase.h
2007-04-25 00:17:39 +00:00
Raymond Hettinger
7a3d41f4ca
Bug #1563759 : struct.unpack doens't support buffer protocol objects
2007-04-05 18:00:03 +00:00
Martin v. Löwis
aef4c6bc00
Patch #1610575 : Add support for _Bool to struct.
2007-01-21 09:33:07 +00:00
Bob Ippolito
e6c9f982a0
Fix #1530559 , struct.pack raises TypeError where it used to convert.
...
Passing float arguments to struct.pack when integers are expected
now triggers a DeprecationWarning.
2006-08-04 23:59:21 +00:00
Neal Norwitz
07aadb14f3
Add PyErr_WarnEx() so C code can pass the stacklevel to warnings.warn().
...
This provides the proper warning for struct.pack().
PyErr_Warn() is now deprecated in favor of PyErr_WarnEx().
As mentioned by Tim Peters on python-dev.
2006-07-30 06:55:48 +00:00
Neal Norwitz
3c5431e132
Wrap some long lines
...
Top/Bottom factor out some common expressions
Add a XXX comment about widing offset.
2006-06-11 05:45:25 +00:00
Tim Peters
5ec2e85d0c
s_methods[]: Stop compiler warnings by casting
...
s_unpack_from to PyCFunction.
2006-06-04 15:49:07 +00:00
Martin Blais
af2ae72cb2
Fixes in struct and socket from merge reviews.
...
- Following Guido's comments, renamed
* pack_to -> pack_into
* recv_buf -> recv_into
* recvfrom_buf -> recvfrom_into
- Made fixes to _struct.c according to Neal Norwitz comments on the checkins
list.
- Converted some ints into the appropriate -- I hope -- ssize_t and size_t.
2006-06-04 13:49:49 +00:00
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
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
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
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
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
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
Bob Ippolito
aa70a17e13
enable all of the struct tests, use ssize_t, fix some whitespace
2006-05-26 20:25:23 +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