Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2:PowerPC
python-vorbis
pyvorbis-1.3-ssize.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pyvorbis-1.3-ssize.patch of Package python-vorbis
--- src/pyvorbiscodec.c +++ src/pyvorbiscodec.c @@ -231,7 +231,7 @@ { PyObject *cur; int k; - int len = -1; + Py_ssize_t len = -1; for (k = 0; k < size; k++) { cur = PyTuple_GET_ITEM(args, k); @@ -245,7 +245,7 @@ if (PyString_Size(cur) != len) return DIFF_LENGTHS; } - return len; + return (len > INT_MAX) ? INT_MAX : len; } static PyObject * @@ -272,7 +272,7 @@ if (PyTuple_Size(args) != channels) { snprintf(err_msg, sizeof(err_msg), "Expected %d strings as arguments; found %d arguments", - channels, PyTuple_Size(args)); + channels, Py_SAFE_DOWNCAST(PyTuple_Size(args),Py_ssize_t,int)); PyErr_SetString(Py_VorbisError, err_msg); return NULL; } --- src/pyvorbisinfo.c +++ src/pyvorbisinfo.c @@ -265,7 +265,7 @@ static PyObject *py_comment_subscript(py_vcomment *, PyObject *); static PyMappingMethods py_vcomment_Mapping_Methods = { - (inquiry) py_comment_length, + (lenfunc) py_comment_length, (binaryfunc) py_comment_subscript, (objobjargproc) py_comment_assign }; @@ -553,7 +553,7 @@ static PyObject * py_comment_items(PyObject *self, PyObject *args) { - int curitem, curpos, j; + Py_ssize_t curitem, curpos, j; PyObject *key, *val, *curval, *tuple; PyObject *retlist; PyObject *dict; @@ -591,7 +591,7 @@ static PyObject * py_comment_values(PyObject *self, PyObject *args) { - int curitem, curpos, j; + Py_ssize_t curitem, curpos, j; PyObject *key, *val, *curval; PyObject *retlist; PyObject *dict; @@ -768,7 +768,7 @@ if (PyString_Check(item_vals)) { return assign_tag(vcomment, key, item_vals); } else if (PySequence_Check(item_vals)) { - int j, val_length = PySequence_Length(item_vals); + Py_ssize_t j, val_length = PySequence_Length(item_vals); if (!pystrcasecmp(key, "vendor") && val_length > 1) { PyErr_SetString(PyExc_ValueError, "Cannot have multiple vendor tags"); } @@ -792,7 +792,7 @@ vorbis_comment *vcomment = NULL; int initted = 0; PyObject *items = NULL; - int k, length; + Py_ssize_t k, length; vcomment = (vorbis_comment *) malloc(sizeof(vorbis_comment)); if (!vcomment) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor