This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] python: Make Windows-specific code work with Python 3
- From: Tom Tromey <tom at tromey dot com>
- To: Jan Vrany <jan dot vrany at fit dot cvut dot cz>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 30 Oct 2018 14:08:29 -0600
- Subject: Re: [PATCH] python: Make Windows-specific code work with Python 3
- References: <20181026093501.9377-1-jan.vrany@fit.cvut.cz>
>>>>> "Jan" == Jan Vrany <jan.vrany@fit.cvut.cz> writes:
Jan> Windows workaround in python_run_simple_file() used Python 2
Jan> APIs which were removed in Python 3. This commit adds a
Jan> conditionally compiled variant that uses Python 3 APIs.
Jan> +# ifdef IS_PY3K
Jan> + FILE *python_file = _Py_fopen (full_path.get (), (char *) "r");
I'm a bit reluctant to rely on an undocumented API.
I'd guess from the name that this is supposed to be internal...?
Also, nothing closes this new file.
Tom