@@ -856,14 +856,22 @@ np_double_complex(_structmodulestate *state, char *p, PyObject *v,
856
856
}
857
857
#else
858
858
static int
859
- complex_format_stub (_structmodulestate * state , char * p , PyObject * v ,
860
- const formatdef * f )
859
+ np_complex_stub (_structmodulestate * state , char * p , PyObject * v ,
860
+ const formatdef * f )
861
861
{
862
862
PyErr_Format (state -> StructError ,
863
863
"'%c' format not supported on this system" ,
864
864
f -> format );
865
865
return -1 ;
866
866
}
867
+ static PyObject *
868
+ nu_complex_stub (_structmodulestate * state , const char * p , const formatdef * f )
869
+ {
870
+ PyErr_Format (state -> StructError ,
871
+ "'%c' format not supported on this system" ,
872
+ f -> format );
873
+ return NULL ;
874
+ }
867
875
#endif
868
876
869
877
static int
@@ -908,8 +916,8 @@ static const formatdef native_table[] = {
908
916
{'E' , sizeof (float complex ), FLOAT_COMPLEX_ALIGN , nu_float_complex , np_float_complex },
909
917
{'C' , sizeof (double complex ), DOUBLE_COMPLEX_ALIGN , nu_double_complex , np_double_complex },
910
918
#else
911
- {'E' , 1 , 0 , complex_format_stub , complex_format_stub },
912
- {'C' , 1 , 0 , complex_format_stub , complex_format_stub },
919
+ {'E' , 1 , 0 , nu_complex_stub , np_complex_stub },
920
+ {'C' , 1 , 0 , nu_complex_stub , np_complex_stub },
913
921
#endif
914
922
{'P' , sizeof (void * ), VOID_P_ALIGN , nu_void_p , np_void_p },
915
923
{0 }
@@ -1250,8 +1258,8 @@ static formatdef bigendian_table[] = {
1250
1258
{'E' , 8 , 0 , bu_float_complex , bp_float_complex },
1251
1259
{'C' , 16 , 0 , bu_double_complex , bp_double_complex },
1252
1260
#else
1253
- {'E' , 1 , 0 , complex_format_stub , complex_format_stub },
1254
- {'C' , 1 , 0 , complex_format_stub , complex_format_stub },
1261
+ {'E' , 1 , 0 , nu_complex_stub , np_complex_stub },
1262
+ {'C' , 1 , 0 , nu_complex_stub , np_complex_stub },
1255
1263
#endif
1256
1264
{0 }
1257
1265
};
@@ -1576,8 +1584,8 @@ static formatdef lilendian_table[] = {
1576
1584
{'E' , 8 , 0 , lu_float_complex , lp_float_complex },
1577
1585
{'C' , 16 , 0 , lu_double_complex , lp_double_complex },
1578
1586
#else
1579
- {'E' , 1 , 0 , complex_format_stub , complex_format_stub },
1580
- {'C' , 1 , 0 , complex_format_stub , complex_format_stub },
1587
+ {'E' , 1 , 0 , nu_complex_stub , np_complex_stub },
1588
+ {'C' , 1 , 0 , nu_complex_stub , np_complex_stub },
1581
1589
#endif
1582
1590
{0 }
1583
1591
};
0 commit comments