merge with 2.5 at r22793
This commit is contained in:
@@ -242,7 +242,7 @@ static PyObject *Euler_Rotate(EulerObject * self, PyObject *args)
|
||||
PyErr_SetString(PyExc_TypeError, "euler.rotate():expected angle (float) and axis (x,y,z)");
|
||||
return NULL;
|
||||
}
|
||||
if(!STREQ3(axis,"x","y","z")){
|
||||
if(ELEM3(*axis, 'x', 'y', 'z') && axis[1]=='\0'){
|
||||
PyErr_SetString(PyExc_TypeError, "euler.rotate(): expected axis to be 'x', 'y' or 'z'");
|
||||
return NULL;
|
||||
}
|
||||
@@ -508,7 +508,7 @@ static int Euler_ass_slice(EulerObject * self, int begin, int end,
|
||||
}
|
||||
//-----------------PROTCOL DECLARATIONS--------------------------
|
||||
static PySequenceMethods Euler_SeqMethods = {
|
||||
(inquiry) Euler_len, /* sq_length */
|
||||
(lenfunc) Euler_len, /* sq_length */
|
||||
(binaryfunc) 0, /* sq_concat */
|
||||
(ssizeargfunc) 0, /* sq_repeat */
|
||||
(ssizeargfunc) Euler_item, /* sq_item */
|
||||
@@ -547,13 +547,7 @@ static PyGetSetDef Euler_getseters[] = {
|
||||
|
||||
//------------------PY_OBECT DEFINITION--------------------------
|
||||
PyTypeObject euler_Type = {
|
||||
#if (PY_VERSION_HEX >= 0x02060000)
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
#else
|
||||
/* python 2.5 and below */
|
||||
PyObject_HEAD_INIT( NULL ) /* required py macro */
|
||||
0, /* ob_size */
|
||||
#endif
|
||||
"euler", //tp_name
|
||||
sizeof(EulerObject), //tp_basicsize
|
||||
0, //tp_itemsize
|
||||
|
||||
Reference in New Issue
Block a user