I get complaints from the compiler about duplicate definitions of macro's and 
functions ...

As an aside, I am trying to walk db->aFunc as follows:

    sqlite3 *db = sqlite3_context_db_handle(context);
    Hash *h = &(db->aFunc);
    HashElem *p;
    FuncDef *d;
    char *functype;
    for (p = h->first; p; p = p->next)
    {
        d = p->data;
        functype = d->xFinalize ? "aggregate" : "scalar";
        printf("%s  %s %d %d\n", d->zName, functype, d->nArg, d->funcFlags);
        while (d->pNext)
        {
            d = d->pNext;
            functype = d->xFinalize ? "aggregate" : "scalar";
            printf("%s* %s %d %d\n", d->zName, functype, d->nArg, d->funcFlags);
        }
    }

but for functions which have both a scalar and aggregate form only the 
aggregate is showing up (actually, only the last version registered is showing 
up -- so which one shows up is scalar/aggregate is determined by which one was 
defined last).  

When I asked you about this you said that I simply need to register the 
function twice, once as an aggregate function and once as a scaler function, 
but it does not appear to actually keep the two different definitions.  Is this 
a bug or working as intended?


> -----Original Message-----
> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> On Behalf Of Richard Hipp
> Sent: Thursday, 9 March, 2017 13:08
> To: SQLite mailing list
> Subject: Re: [sqlite] More built-in functions for basic math
> 
> On 3/9/17, Keith Medcalf <kmedc...@dessus.com> wrote:
> >
> > note that fileio.c and shathree.c are inlined into shell.c, so in order
> to
> > remove them I have to modify shell.c to ifdef them out when I am
> building.
> >
> 
> Seriously?  I have no trouble loading the external fileio.c and
> shathree.c extensions on top of the similar extensions that are built
> into the shell.  Nothing about the shell code has to change.  What
> part of that is not working for you?
> 
> --
> D. Richard Hipp
> d...@sqlite.org
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to