File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -2341,13 +2341,8 @@ static int
23412341_vector2_set (pgVector * self , PyObject * xOrSequence , PyObject * y )
23422342{
23432343 if (xOrSequence ) {
2344- if (pgVectorCompatible_Check (xOrSequence , self -> dim )) {
2345- if (!PySequence_AsVectorCoords (xOrSequence , self -> coords , 2 )) {
2346- return -1 ;
2347- }
2348- else {
2349- return 0 ;
2350- }
2344+ if (pg_VectorCoordsFromObj (xOrSequence , 2 , self -> coords )) {
2345+ return 0 ;
23512346 }
23522347 else if (RealNumber_Check (xOrSequence )) {
23532348 self -> coords [0 ] = PyFloat_AsDouble (xOrSequence );
@@ -2789,13 +2784,8 @@ static int
27892784_vector3_set (pgVector * self , PyObject * xOrSequence , PyObject * y , PyObject * z )
27902785{
27912786 if (xOrSequence ) {
2792- if (pgVectorCompatible_Check (xOrSequence , self -> dim )) {
2793- if (!PySequence_AsVectorCoords (xOrSequence , self -> coords , 3 )) {
2794- return -1 ;
2795- }
2796- else {
2797- return 0 ;
2798- }
2787+ if (pg_VectorCoordsFromObj (xOrSequence , 3 , self -> coords )) {
2788+ return 0 ;
27992789 }
28002790 else if (RealNumber_Check (xOrSequence )) {
28012791 self -> coords [0 ] = PyFloat_AsDouble (xOrSequence );
You can’t perform that action at this time.
0 commit comments