On Thu, Mar 30, 2017 at 10:44 AM, Clemens Ladisch <[email protected]> wrote: > Richard Hipp wrote: >> #ifdef sqlite3Parser_ENGINEALWAYSONSTACK >> - unsigned char zSpace[sizeof(yyParser)]; /* Space for parser engine >> object */ >> + /* Space to hold the Lemon-generated Parser object */ >> + sqlite3_uint64 zSpace[sizeof(yyParser)/sizeof(sqlite_uint64)]; >> #endif > > The yyParser type is known at this place (otherwise, sizeof() would not > work). So why isn't a variable of this type defined directly?
Also, isn't the new code potentially allocating a smaller buffer in zSpace? If sizeof(yyParser) is 15, the removed line would allocate a 15 element array of unsigned char objects for a total of 15 bytes. The added line would allocate a 15/8 = 1 element array of sqlite3_uint64 objects for a total of 8 bytes. -- Scott Robison _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

