projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18e22f9
)
lib/gen_pyobject.py: fix size checks
author
Paul Brossier
<piem@piem.org>
Tue, 10 Dec 2013 22:57:54 +0000
(17:57 -0500)
committer
Paul Brossier
<piem@piem.org>
Tue, 10 Dec 2013 22:57:54 +0000
(17:57 -0500)
Signed-off-by: Paul Brossier <piem@piem.org>
python/lib/gen_pyobject.py
patch
|
blob
|
history
diff --git
a/python/lib/gen_pyobject.py
b/python/lib/gen_pyobject.py
index
d3f7261
..
ba8274e
100644
(file)
--- a/
python/lib/gen_pyobject.py
+++ b/
python/lib/gen_pyobject.py
@@
-239,9
+239,9
@@
Py_%(name)s_new (PyTypeObject * pytype, PyObject * args, PyObject * kwds)
s += """\
self->%(pname)s = %(defval)s;
- if (%(pname)s > 0) {
+ if (
(sint_t)
%(pname)s > 0) {
self->%(pname)s = %(pname)s;
- } else if (%(pname)s < 0) {
+ } else if (
(sint_t)
%(pname)s < 0) {
PyErr_SetString (PyExc_ValueError,
"can not use negative value for %(pname)s");
return NULL;