SQLite
Check-in [b74e6be818]
Not logged in
Overview
SHA1 Hash:b74e6be818fa7d19f1af6d86ad1d2ecba334b01b
Date: 2013-09-13 21:03:46
User: drh
Comment:Fix the ""const"" qualifiers on the pragma name table.
Tags And Properties
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/pragma.c

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







|







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

Changes to tool/mkpragmatab.tcl

307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
  puts [format {#define %-35s %4d} PragTyp_$type $pnum]
  incr pnum
}

# Generate the lookup table
#
puts "static const struct sPragmaNames \173"
puts "  const char const *zName;  /* Name of pragma */"
puts "  u8 ePragTyp;              /* PragTyp_XXX value */"
puts "  u32 iArg;                 /* Extra argument */"
puts "\175 aPragmaNames\[\] = \173"

set current_if {}
set spacer [format {    %26s } {}]
foreach name $allnames {







|







307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
  puts [format {#define %-35s %4d} PragTyp_$type $pnum]
  incr pnum
}

# Generate the lookup table
#
puts "static const struct sPragmaNames \173"
puts "  const char *const zName;  /* Name of pragma */"
puts "  u8 ePragTyp;              /* PragTyp_XXX value */"
puts "  u32 iArg;                 /* Extra argument */"
puts "\175 aPragmaNames\[\] = \173"

set current_if {}
set spacer [format {    %26s } {}]
foreach name $allnames {