@@ -225,6 +225,8 @@ PyGcc_get_option_dict(PyObject *self, PyObject *args)
225
225
return dict ;
226
226
}
227
227
228
+ /* Function has been removed from GCC 10. */
229
+ #if (GCC_VERSION < 10000 )
228
230
static PyObject *
229
231
PyGcc_get_parameters (PyObject * self , PyObject * args )
230
232
{
@@ -256,6 +258,7 @@ PyGcc_get_parameters(PyObject *self, PyObject *args)
256
258
Py_XDECREF (dict );
257
259
return NULL ;
258
260
}
261
+ #endif
259
262
260
263
IMPL_APPENDER (add_var_to_list ,
261
264
gcc_variable ,
@@ -452,9 +455,12 @@ static PyMethodDef GccMethods[] = {
452
455
("Get all command-line options, as a dict from command-line text strings "
453
456
"to gcc.Option instances" )},
454
457
458
+ /* Function has been removed from GCC 10. */
459
+ #if (GCC_VERSION < 10000 )
455
460
{"get_parameters" , PyGcc_get_parameters , METH_NOARGS ,
456
461
"Get all tunable GCC parameters. Returns a dictionary, mapping from"
457
462
"option name -> gcc.Parameter instance" },
463
+ #endif
458
464
459
465
{"get_variables" , PyGcc_get_variables , METH_NOARGS ,
460
466
"Get all variables in this compilation unit as a list of gcc.Variable" },
@@ -811,7 +817,9 @@ plugin_init (struct plugin_name_args *plugin_info,
811
817
autogenerated_gimple_init_types (); /* FIXME: error checking! */
812
818
autogenerated_location_init_types (); /* FIXME: error checking! */
813
819
autogenerated_option_init_types (); /* FIXME: error checking! */
820
+ #if (GCC_VERSION < 10000 )
814
821
autogenerated_parameter_init_types (); /* FIXME: error checking! */
822
+ #endif
815
823
autogenerated_pass_init_types (); /* FIXME: error checking! */
816
824
autogenerated_pretty_printer_init_types (); /* FIXME: error checking! */
817
825
autogenerated_rtl_init_types (); /* FIXME: error checking! */
@@ -826,7 +834,9 @@ plugin_init (struct plugin_name_args *plugin_info,
826
834
autogenerated_gimple_add_types (PyGcc_globals .module );
827
835
autogenerated_location_add_types (PyGcc_globals .module );
828
836
autogenerated_option_add_types (PyGcc_globals .module );
837
+ #if (GCC_VERSION < 10000 )
829
838
autogenerated_parameter_add_types (PyGcc_globals .module );
839
+ #endif
830
840
autogenerated_pass_add_types (PyGcc_globals .module );
831
841
autogenerated_pretty_printer_add_types (PyGcc_globals .module );
832
842
autogenerated_rtl_add_types (PyGcc_globals .module );
0 commit comments