lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <mar...@rectangular.com>
Subject Re: [lucy-dev] New branch LUCY-215-cf-extensions
Date Sun, 25 Mar 2012 18:33:55 GMT
On Sat, Mar 24, 2012 at 4:37 AM, Nick Wellnhofer <wellnhofer@aevum.de> wrote:

> One thing is core/Lucy/Util/ToolSet.h, which is included from every
> Clownfish .c file. I'm not sure what's the best way to handle that.

For the record, I grepped trunk/clownfish for "ToolSet" and came up empty.  I
believe it's used only in Lucy-specific hand-coded .c files in core/, not in
CFC-autogenerated files.  Right?

Nevertheless, there is still a potential problem in that .cfh files are
allowed to contain arbitrary C code, and this scenario could have arisen:

    class Lucy::Foo::Bar {
        ...
    }

    __C__
    #include "Lucy/Util/ToolSet.h"
    __END_C__

To address that scenario, I believe that the best approach is to install all
.h files in core/ along with all .cfh files underneath Clownfish/_include.

For the time being I believe this is only a theoretical problem, because no
.cfh file in the Lucy core actually pound-includes any .h file -- but it
certainly is likely to become a problem in the future.  (I was surprised to
discover that Json.cfh doesn't actually require the Lemon-generated header
Lucy/Util/Json/JsonParser.h -- only Json.c needs it.)

Marvin Humphrey

Mime
View raw message