mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Change the VdbeOp.p4 union to include specific pointer types for the various values of VdbeOp.p4type. (CVS 4667)
FossilOrigin-Name: 7e8330c8044dc7718e720dbd33f6e2fe970ead77
This commit is contained in:
22
src/vdbe.h
22
src/vdbe.h
@@ -15,7 +15,7 @@
|
||||
** or VDBE. The VDBE implements an abstract machine that runs a
|
||||
** simple program to access and modify the underlying database.
|
||||
**
|
||||
** $Id: vdbe.h,v 1.121 2008/01/03 09:51:55 danielk1977 Exp $
|
||||
** $Id: vdbe.h,v 1.122 2008/01/03 11:50:30 danielk1977 Exp $
|
||||
*/
|
||||
#ifndef _SQLITE_VDBE_H_
|
||||
#define _SQLITE_VDBE_H_
|
||||
@@ -28,6 +28,13 @@
|
||||
*/
|
||||
typedef struct Vdbe Vdbe;
|
||||
|
||||
/*
|
||||
** The names of the following types declared in vdbeInt.h are required
|
||||
** for the VdbeOp definition.
|
||||
*/
|
||||
typedef struct VdbeFunc VdbeFunc;
|
||||
typedef struct Mem Mem;
|
||||
|
||||
/*
|
||||
** A single instruction of the virtual machine has an opcode
|
||||
** and as many as three operands. The instruction is recorded
|
||||
@@ -42,8 +49,17 @@ struct VdbeOp {
|
||||
int p2; /* Second parameter (often the jump destination) */
|
||||
int p3; /* The third parameter */
|
||||
union { /* forth parameter */
|
||||
int i; /* Integer value if p3type==P4_INT32 */
|
||||
char *p; /* A pointer for all other value sof p3type */
|
||||
int i; /* Integer value if p4type==P4_INT32 */
|
||||
void *p; /* Generic pointer */
|
||||
char *z; /* Pointer to data for string (char array) types */
|
||||
i64 *pI64; /* Used when p4type is P4_INT64 */
|
||||
double *pReal; /* Used when p4type is P4_REAL */
|
||||
FuncDef *pFunc; /* Used when p4type is P4_FUNCDEF */
|
||||
VdbeFunc *pVdbeFunc; /* Used when p4type is P4_VDBEFUNC */
|
||||
CollSeq *pColl; /* Used when p4type is P4_COLLSEQ */
|
||||
Mem *pMem; /* Used when p4type is P4_MEM */
|
||||
sqlite3_vtab *pVtab; /* Used when p4type is P4_VTAB */
|
||||
KeyInfo *pKeyInfo; /* Used when p4type is P4_KEYINFO */
|
||||
} p4;
|
||||
#ifdef SQLITE_DEBUG
|
||||
char *zComment; /* Comment to improve readability */
|
||||
|
Reference in New Issue
Block a user