/ Check-in [326fc9cc]
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 | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:326fc9cc11c86f2d96763537d60757200ce21a84
User & Date: drh 2005-12-22 13:47:50
Context
2005-12-29
01:11
Add support for DROP TABLE IF EXISTS. (CVS 2843) check-in: a4c547de user: drh tags: trunk
2005-12-22
13:47
Make genericAllocationSize work on NULL pointers. (CVS 2842) check-in: 326fc9cc user: drh tags: trunk
2005-12-21
18:36
Bug fixes and additional testing of descending indices. (CVS 2841) check-in: 5638a11e user: drh tags: trunk
Changes
Hide Diffs Unified Diffs 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;
}