diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-09 17:53:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-09 17:53:18 +0300 |
commit | c9f353956c19abf184496978927c4af5209ec97f (patch) | |
tree | 89352c1d4e2110c583ce4b38ffe70ada6d1d945c /source/blender/python/generic/bgl.c | |
parent | 0660078b8bb5eac6f81bd352505dc6f7d72e06c1 (diff) |
use PySequence_Size() rather then PySequence_Length(), this is only kept in python for backwards compatibility.
Diffstat (limited to 'source/blender/python/generic/bgl.c')
-rw-r--r-- | source/blender/python/generic/bgl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c index e72f2136ee5..3d525b08ecc 100644 --- a/source/blender/python/generic/bgl.c +++ b/source/blender/python/generic/bgl.c @@ -207,7 +207,7 @@ static PyObject *Method_Buffer (PyObject *UNUSED(self), PyObject *args) ndimensions= 1; dimensions[0]= PyLong_AsLong(length_ob); } else if (PySequence_Check(length_ob)) { - ndimensions= PySequence_Length(length_ob); + ndimensions= PySequence_Size(length_ob); if (ndimensions > MAX_DIMENSIONS) { PyErr_SetString(PyExc_AttributeError, "too many dimensions, max is 256"); return NULL; @@ -360,8 +360,8 @@ static int Buffer_ass_slice(PyObject *self, int begin, int end, PyObject *seq) return -1; } - if (PySequence_Length(seq)!=(end-begin)) { - int seq_len = PySequence_Length(seq); + if (PySequence_Size(seq)!=(end-begin)) { + int seq_len = PySequence_Size(seq); char err_str[128]; sprintf(err_str, "size mismatch in assignment. Expected size: %d (size provided: %d)", seq_len, (end-begin)); PyErr_SetString(PyExc_TypeError, err_str); |