blob: dd6c7bcaf185339c7ac5902af78eb1aa69c107dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
$NetBSD: patch-af,v 1.1 2001/10/20 18:52:38 reinoud Exp $
--- ../sqlite/src/table.c.orig Sat Oct 20 16:48:56 2001
+++ ../sqlite/src/table.c
@@ -17,6 +17,7 @@
** if they are not used.
*/
#include <stdlib.h>
+#include <string.h>
#include "sqlite.h"
/*
@@ -137,7 +138,7 @@
res.azResult[0] = 0;
rc = sqlite_exec(db, zSql, sqlite_get_table_cb, &res, pzErrMsg);
if( res.azResult ){
- res.azResult[0] = (char*)res.nData;
+ res.azResult[0] = (char*)res.nData; /* XXX LP64 violation but prolly OK since it doesnt lose stuff XXX */
}
if( rc==SQLITE_ABORT ){
sqlite_free_table(&res.azResult[1]);
@@ -166,7 +167,7 @@
if( azResult ){
int i, n;
azResult--;
- n = (int)azResult[0];
+ n = (int)azResult[0]; /* XXX LP64 violation but in API .... unless the number of recs. > 2^32 its ok :) XXX */
for(i=1; i<n; i++){ if( azResult[i] ) free(azResult[i]); }
free(azResult);
}
|