lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <mar...@rectangular.com>
Subject [lucy-dev] Hiding struct defs
Date Sun, 25 Mar 2012 18:57:05 GMT
On Sat, Mar 24, 2012 at 4:13 AM,  <nwellnhof@apache.org> wrote:
> Author: nwellnhof
> Date: Sat Mar 24 11:13:46 2012
> New Revision: 1304766
>
> URL: http://svn.apache.org/viewvc?rev=1304766&view=rev
> Log:
> Always include ZombieCharBuf and VTable in parcel.c
>
> Extensions need them

If extensions need ZombieCharBuf and VTable header files, that's cool -- but
if they need the struct definitions, that's a bug.

> +        "#define C_LUCY_ZOMBIECHARBUF\n"
> +        "#define C_LUCY_VTABLE\n"
>         "%s\n"
>         "#include \"parcel.h\"\n"
> +        "#include \"Lucy/Object/CharBuf.h\"\n"
> +        "#include \"Lucy/Object/VTable.h\"\n"

The symbol C_LUCY_VTABLE is supposed to communicate "this is VTable.c, so it's
OK to give me access to private data".  The primary data which gets unlocked
is the struct definition for "struct lucy_VTable".

It's very important for the sake of evolving Lucy and Clownfish without
breaking extensions that we not publish struct defs, and that member vars are
only accessible via accessors.

I'm happy to work on this bug if you like, thought you're really tearing it up
on your branch and so it will be tricky to stay out of your way!

Marvin Humphrey

Mime
View raw message