/ Check-in [b74e6be8]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the "const" qualifiers on the pragma name table.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b74e6be818fa7d19f1af6d86ad1d2ecba334b01b
User & Date: drh 2013-09-13 21:03:46
Context
2013-09-13
22:38
VSIX tooling changes to support Visual Studio 2013. check-in: d56fac40 user: mistachkin tags: trunk
21:03
Fix the "const" qualifiers on the pragma name table. check-in: b74e6be8 user: drh tags: trunk
21:01
Add the soft_heap_limit pragma. check-in: c326356f user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pragma.c.

    65     65   #define PragTyp_ACTIVATE_EXTENSIONS           34
    66     66   #define PragTyp_HEXKEY                        35
    67     67   #define PragTyp_KEY                           36
    68     68   #define PragTyp_REKEY                         37
    69     69   #define PragTyp_LOCK_STATUS                   38
    70     70   #define PragTyp_PARSER_TRACE                  39
    71     71   static const struct sPragmaNames {
    72         -  const char const *zName;  /* Name of pragma */
           72  +  const char *const zName;  /* Name of pragma */
    73     73     u8 ePragTyp;              /* PragTyp_XXX value */
    74     74     u32 iArg;                 /* Extra argument */
    75     75   } aPragmaNames[] = {
    76     76   #if defined(SQLITE_HAS_CODEC) || defined(SQLITE_ENABLE_CEROD)
    77     77     { "activate_extensions",     PragTyp_ACTIVATE_EXTENSIONS,    0 },
    78     78   #endif
    79     79   #if !defined(SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS)

Changes to tool/mkpragmatab.tcl.

   307    307     puts [format {#define %-35s %4d} PragTyp_$type $pnum]
   308    308     incr pnum
   309    309   }
   310    310   
   311    311   # Generate the lookup table
   312    312   #
   313    313   puts "static const struct sPragmaNames \173"
   314         -puts "  const char const *zName;  /* Name of pragma */"
          314  +puts "  const char *const zName;  /* Name of pragma */"
   315    315   puts "  u8 ePragTyp;              /* PragTyp_XXX value */"
   316    316   puts "  u32 iArg;                 /* Extra argument */"
   317    317   puts "\175 aPragmaNames\[\] = \173"
   318    318   
   319    319   set current_if {}
   320    320   set spacer [format {    %26s } {}]
   321    321   foreach name $allnames {