SQLite

Check-in [326fc9cc11]
Login

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

Overview
Comment:Make genericAllocationSize work on NULL pointers. (CVS 2842)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 326fc9cc11c86f2d96763537d60757200ce21a84
User & Date: drh 2005-12-22 13:47:50.000
Context
2005-12-29
01:11
Add support for DROP TABLE IF EXISTS. (CVS 2843) (check-in: a4c547de83 user: drh tags: trunk)
2005-12-22
13:47
Make genericAllocationSize work on NULL pointers. (CVS 2842) (check-in: 326fc9cc11 user: drh tags: trunk)
2005-12-21
18:36
Bug fixes and additional testing of descending indices. (CVS 2841) (check-in: 5638a11ed5 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/os_common.h.
152
153
154
155
156
157
158
159
160
161
  return (void *)((char *)p2 + 8);
}
static void genericFree(void *p){
  assert(p);
  free((void *)((char *)p - 8));
}
static int genericAllocationSize(void *p){
  return *(int *)((char *)p - 8);
}








|

<
152
153
154
155
156
157
158
159
160

  return (void *)((char *)p2 + 8);
}
static void genericFree(void *p){
  assert(p);
  free((void *)((char *)p - 8));
}
static int genericAllocationSize(void *p){
  return p ? *(int *)((char *)p - 8) : 0;
}