[1852] in BarnOwl Developers
Re: [PATCH 0/7] Generic perl data export routines
daemon@ATHENA.MIT.EDU (David A Benjamin)
Thu Oct 29 18:23:15 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@lunatique.mit.edu
Date: Mon, 26 Oct 2009 16:25:03 -0400 (EDT)
From: David A Benjamin <davidben@MIT.EDU>
To: Nelson Elhage <nelhage@mit.edu>
cc: barnowl-dev@mit.edu
In-Reply-To: <20091024195558.GF21865@mit.edu>
Pushed. Will look into adding the typedef later.
David
On Sat, 24 Oct 2009, Nelson Elhage wrote:
> Looks good to me. One thing that might make that cast less ugly would
> be to typedef the function type somewhere. Something like
>
> typedef SV* (*owl_to_sv_fn)(const void *);
>
> and then use that type in the casts instead of the ugly
> expression. I'm not sure what the right name is -- I don't love
> owl_to_sv_fn, but it's not obviously wrong.
>
> Signed-off-by: Nelson Elhage <nelhage@mit.edu>
>
> - Nelson
>
> On Sat, Oct 24, 2009 at 01:43:34PM -0400, David Benjamin wrote:
>> I've been sitting on these for a while, and they're probably clean by now, so I
>> guess I'll go email them.
>>
>> These patches add owl_new_av and owl_new_hv functions to copy owl arrays and
>> dicts to perl lists and hashes. owl_new_av is also used to export the names of
>> the keymaps into perl for completion the show command. (Because I apparently
>> have a thing for adding completers to everything.)
>>
>> owl_new_av needs a cast for most of its uses, which is a little ugly, but so
>> does owl_list_free. Using void* in C is wonderful like that.
>>
>> David Benjamin (7):
>> Add typedefs for AV and HV
>> Add owl_new_av to abstract owl_list to AV*
>> Add owl_filter_to_sv for exporting filters
>> Use owl_new_av in exported functions
>> Export BarnOwl::all_keymaps to perl
>> Further complete the show command
>> Add owl_new_hv for future Perl code
>>
>> filter.c | 5 +++
>> owl.h | 2 +
>> perl/lib/BarnOwl/Complete/Client.pm | 4 +++
>> perlconfig.c | 38 +++++++++++++++++++++++++++
>> perlglue.xs | 49 +++++++++++++++-------------------
>> 5 files changed, 71 insertions(+), 27 deletions(-)
>>
>