SQLite

Check-in [84d760bfc1]
Login

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

Overview
Comment:Pull the latest Lemon updates from the lemon-update-2010 branch into the trunk.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 84d760bfc1d219fda99901061bb5db2cafe9eb1d
User & Date: drh 2010-03-03 22:43:38.000
Context
2010-03-04
00:53
Increase the maximum length of an sqlite3_log() result string. Provide more details on the statement abort log message. (check-in: 5322d1df5b user: drh tags: trunk)
2010-03-03
22:43
Pull the latest Lemon updates from the lemon-update-2010 branch into the trunk. (check-in: 84d760bfc1 user: drh tags: trunk)
22:25
Modify the sqlite3_log() interface and implementation so that it never uses dynamic memory allocation - to avoid deadlocking when called while holding the memory allocator mutex. (check-in: 28d1bc98d6 user: drh tags: trunk)
17:09
Fixed compiler warning on Visual Studio. (check-in: 83495128c8 user: icculus tags: lemon-update-2010)
Changes
Unified Diff Ignore Whitespace Patch
Changes to tool/lemon.c.
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
    /* if we failed, delete (most) files we made, to unconfuse build tools. */
    int i;
    for (i = 0; i < made_files_count; i++) {
        if (!successful_exit) {
            remove(made_files[i]);
        }
        free((void *) made_files[i]);
    }
    free(made_files);
    made_files_count = 0;
    made_files = NULL;
}

static char *msort(char*,char**,int(*)(const char*,const char*));







<







41
42
43
44
45
46
47

48
49
50
51
52
53
54
{
    /* if we failed, delete (most) files we made, to unconfuse build tools. */
    int i;
    for (i = 0; i < made_files_count; i++) {
        if (!successful_exit) {
            remove(made_files[i]);
        }

    }
    free(made_files);
    made_files_count = 0;
    made_files = NULL;
}

static char *msort(char*,char**,int(*)(const char*,const char*));
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
  if( rc==0 ){
    rc = (int)ap1->type - (int)ap2->type;
  }
  if( rc==0 && ap1->type==REDUCE ){
    rc = ap1->x.rp->index - ap2->x.rp->index;
  }
  if( rc==0 ){
    rc = ap2 - ap1;
  }
  return rc;
}

/* Sort parser actions */
static struct action *Action_sort(
  struct action *ap







|







394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
  if( rc==0 ){
    rc = (int)ap1->type - (int)ap2->type;
  }
  if( rc==0 && ap1->type==REDUCE ){
    rc = ap1->x.rp->index - ap2->x.rp->index;
  }
  if( rc==0 ){
    rc = (int) (ap2 - ap1);
  }
  return rc;
}

/* Sort parser actions */
static struct action *Action_sort(
  struct action *ap
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
  ** is to keep makefiles from getting confused. We don't include .out files,
  ** though: this is debug information, and you don't want it deleted if there
  ** was an error you need to track down.
  */
  if(( *mode=='w' ) && (strcmp(suffix, ".out") != 0)){
    const char **ptr = (const char **)
        realloc(made_files, sizeof (const char **) * (made_files_count + 1));
    char *fname = strdup(lemp->outname);
    if ((ptr == NULL) || (fname == NULL)) {
        free(ptr);
        free(fname);
        memory_error();
    }
    made_files = ptr;
    made_files[made_files_count++] = fname;
  }
  return fp;
}







|


<







2754
2755
2756
2757
2758
2759
2760
2761
2762
2763

2764
2765
2766
2767
2768
2769
2770
  ** is to keep makefiles from getting confused. We don't include .out files,
  ** though: this is debug information, and you don't want it deleted if there
  ** was an error you need to track down.
  */
  if(( *mode=='w' ) && (strcmp(suffix, ".out") != 0)){
    const char **ptr = (const char **)
        realloc(made_files, sizeof (const char **) * (made_files_count + 1));
    const char *fname = Strsafe(lemp->outname);
    if ((ptr == NULL) || (fname == NULL)) {
        free(ptr);

        memory_error();
    }
    made_files = ptr;
    made_files[made_files_count++] = fname;
  }
  return fp;
}