-/* Architecture and language to be used in callbacks from
- the Python interpreter. */
-struct gdbarch *python_gdbarch;
-const struct language_defn *python_language;
-
-/* Restore global language and architecture and Python GIL state
- when leaving the Python interpreter. */
-
-struct python_env
+static script_sourcer_func gdbpy_source_script;
+static objfile_script_sourcer_func gdbpy_source_objfile_script;
+static objfile_script_executor_func gdbpy_execute_objfile_script;
+static void gdbpy_finish_initialization
+ (const struct extension_language_defn *);
+static int gdbpy_initialized (const struct extension_language_defn *);
+static void gdbpy_eval_from_control_command
+ (const struct extension_language_defn *, struct command_line *cmd);
+static void gdbpy_start_type_printers (const struct extension_language_defn *,
+ struct ext_lang_type_printers *);
+static enum ext_lang_rc gdbpy_apply_type_printers
+ (const struct extension_language_defn *,
+ const struct ext_lang_type_printers *, struct type *, char **);
+static void gdbpy_free_type_printers (const struct extension_language_defn *,
+ struct ext_lang_type_printers *);
+static void gdbpy_set_quit_flag (const struct extension_language_defn *);
+static int gdbpy_check_quit_flag (const struct extension_language_defn *);
+static enum ext_lang_rc gdbpy_before_prompt_hook
+ (const struct extension_language_defn *, const char *current_gdb_prompt);
+
+/* The interface between gdb proper and loading of python scripts. */
+
+const struct extension_language_script_ops python_extension_script_ops =