Daniel Diniz aja...@gmail.com added the comment:
BTW, there's a warning in _struct.c:180 - warning: 'get_ulong'
defined but not used, should I open a new issue?
Sure. Please could you add me to the nosy list if you do.
OK, should do that soon.
In my opinion, the struct module *really*
Georg Brandl ge...@python.org added the comment:
Applied in r69577, r69578.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3694
___
Mark Dickinson dicki...@gmail.com added the comment:
BTW, there's a warning in _struct.c:180 - warning: ‘get_ulong’
defined but not used, should I open a new issue?
Sure. Please could you add me to the nosy list if you do.
In my opinion, the struct module *really* needs an overhaul,
Daniel Diniz aja...@gmail.com added the comment:
Looks like both Undetected errors were corrected by Victor's patches,
which Benjamin committed around rev66693, so trunk only needs a test.
Here are the patches.
I think IndexError fits better (and matches trunk), as the issue is that
None is
Changes by Daniel Diniz aja...@gmail.com:
Removed file: http://bugs.python.org/file13017/pynumber_assizet.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3694
___
Changes by Daniel Diniz aja...@gmail.com:
Added file: http://bugs.python.org/file13028/pynumber_assizet_trunk.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3694
___
Changes by Daniel Diniz aja...@gmail.com:
--
nosy: +marketdickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3694
___
___
Python-bugs-list
Antoine Pitrou pit...@free.fr added the comment:
Yes, PyNumber_AsSsize_t() should be used instead.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3694
___
Antoine Pitrou pit...@free.fr added the comment:
Oh, and a test should be added :)
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3694
___
___
Daniel Diniz aja...@gmail.com added the comment:
Here's a patch with test for 3.x. Erm, I have no idea if that's all that
is necessary :)
Does this have the potential to break existing code?
Added file: http://bugs.python.org/file13017/pynumber_assizet.diff
Antoine Pitrou pit...@free.fr added the comment:
Well, a patch for 2.6 should be provided as well. Besides,
PyExc_OverflowError is probably a better choice than PyExc_IndexError
(but I'm not sure on this one).
___
Python tracker rep...@bugs.python.org
Georg Brandl [EMAIL PROTECTED] added the comment:
The problem is that, unlike PyInt_AsSsize_t, PyLong_AsSsize_t expects
its argument to already be a long object and else raises the SystemError.
It should probably behave like PyInt_AsSsize_t and raise the TypeError
since in 3.0 it's used in many
Georg Brandl [EMAIL PROTECTED] added the comment:
The attached patches at least correct the XXX undetected error.
--
keywords: +patch
Added file: http://bugs.python.org/file11267/s26.diff
___
Python tracker [EMAIL PROTECTED]
Changes by Georg Brandl [EMAIL PROTECTED]:
Added file: http://bugs.python.org/file11268/s30.diff
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3694
___
___
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
Isn't PyNumber_AsSsize_t designed for this purpose?
--
nosy: +amaury.forgeotdarc
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3694
___
New submission from Daniel Diniz [EMAIL PROTECTED]:
The following code leads to XXX Undetected errors in debug builds of
trunk and 3.0:
import _struct
_struct.pack_into(b8, bytearray(1), None)
Besides that, there's something fishy happening in non-debug builds:
2.6:
_struct.pack_into(b8,
16 matches
Mail list logo