This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: fix PR python/14387


On Wed, Aug 1, 2012 at 10:26 AM, Tom Tromey <tromey@redhat.com> wrote:

> Occasionally I despair of us ever writing correct Python-using code.
> I wish we could use a generator like Cython...

FWIW the guy at this blog has been working on a gcc-python-plugin to
generate cython pxd files from gcc for summer of code.

http://redbrain.co.uk/

at least worth keeping an eye on, (i had done some similar work on g++
plugin for cython), but abandoned for now and doesn't seem to be very
relevent for gdb so i'll try and keep that short,

if i restart the efford i'd probably just generate python api c code directly.

this is mostly due to the hacks required for c++, but also I found
cython file format to be mildly annoying from the perspective of a
code generator (e.g. generating multiple files in a single pass with
different levels of significant white space indentation, tons of
functions with minor variations (argument list requiring a self
argument, vs implicit self argument, required type + implicit self,
required type + self argument)

In the end I found a c++ library with an existing python api to play
middle man with the c++ library I was trying to wrap, and wrote a tiny
little adaptor for the 2 and am happy.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]