[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-recutils] GSoC 2013 - Python bindings for recutils

From: Jose E. Marchesi
Subject: Re: [bug-recutils] GSoC 2013 - Python bindings for recutils
Date: Mon, 29 Apr 2013 10:23:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

    I have written my proposal, but have a few clarifications first.  I
    have been reading up about recutils and python bindings, and have
    written wrappers for a few simple C functions.  For the librec
    library, I understand that you want the functionality to be
    preserved, so you would want that we use python data structures in
    addition to using C functions.

Correct.  The binding must not just implement a 1-1 relationship between
the C abstractions and equivalent python abstractions, but to export the
functionality provided by librec in a way which is natural to the python
semantics.  To determine the best way on how to do that is part of the

In your proposal, please include:

- General approach.  If there is more than one way to write python
  bindings please specify which one you will be using and why it is the
  best option.

- An initial mapping between the abstractions exposed in rec.h and the
  python abstractions: how to represent records? fields? record sets?
  the queries?  And why?

    An important issue is memory allocation. We would have to allocate
    memory from the python heap rather than the C allocator, so it is
    under the control of the python memory manager. The documentation
    gives several reasons why this is preferable.

Yes, you have to keep in mind how python manages its memory (it is
reference counting if I remember properly).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]