use PySequence_Size() rather then PySequence_Length(), this is only kept in python for backwards compatibility.

This commit is contained in:
Campbell Barton
2011-01-09 14:53:18 +00:00
parent 0660078b8b
commit c9f353956c
12 changed files with 27 additions and 27 deletions

View File

@@ -851,7 +851,7 @@ Factory_filter(Factory* self, PyObject* args)
return NULL;
}
if(!PySequence_Length(py_b) || (py_a != NULL && !PySequence_Length(py_a)))
if(!PySequence_Size(py_b) || (py_a != NULL && !PySequence_Size(py_a)))
{
PyErr_SetString(PyExc_ValueError, "The sequence has to contain at least one value!");
return NULL;
@@ -862,7 +862,7 @@ Factory_filter(Factory* self, PyObject* args)
float value;
int result;
for(int i = 0; i < PySequence_Length(py_b); i++)
for(int i = 0; i < PySequence_Size(py_b); i++)
{
py_value = PySequence_GetItem(py_b, i);
result = PyArg_Parse(py_value, "f:filter", &value);
@@ -876,7 +876,7 @@ Factory_filter(Factory* self, PyObject* args)
if(py_a)
{
for(int i = 0; i < PySequence_Length(py_a); i++)
for(int i = 0; i < PySequence_Size(py_a); i++)
{
py_value = PySequence_GetItem(py_a, i);
result = PyArg_Parse(py_value, "f:filter", &value);