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
2341
2341
_vector2_set (pgVector * self , PyObject * xOrSequence , PyObject * y )
2342
2342
{
2343
2343
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 ;
2351
2346
}
2352
2347
else if (RealNumber_Check (xOrSequence )) {
2353
2348
self -> coords [0 ] = PyFloat_AsDouble (xOrSequence );
@@ -2789,13 +2784,8 @@ static int
2789
2784
_vector3_set (pgVector * self , PyObject * xOrSequence , PyObject * y , PyObject * z )
2790
2785
{
2791
2786
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 ;
2799
2789
}
2800
2790
else if (RealNumber_Check (xOrSequence )) {
2801
2791
self -> coords [0 ] = PyFloat_AsDouble (xOrSequence );
You can’t perform that action at this time.
0 commit comments