示例#1
0
 /*
 ** Bind a new array array of integers to a specific intarray object.
 **
 ** The array of integers bound must be unchanged for the duration of
 ** any query against the corresponding virtual table.  If the integer
 ** array does change or is deallocated undefined behavior will result.
 */
 static int sqlite3_intarray_bind(
     sqlite3_intarray pIntArray, /* The intarray object to bind to */
     int nElements,              /* Number of elements in the intarray */
     sqlite3_int64[] aElements,  /* Content of the intarray */
     dxFree xFree                //void (*xFree)(void*)           /* How to dispose of the intarray when done */
     )
 {
     if (pIntArray.xFree != null)
     {
         pIntArray.a = null;//pIntArray.xFree( pIntArray.a );
     }
     pIntArray.n     = nElements;
     pIntArray.a     = aElements;
     pIntArray.xFree = xFree;
     return(SQLITE_OK);
 }
示例#2
0
 public sqlite3_mem_methods(
 dxMalloc xMalloc,
 dxMallocInt xMallocInt,
 dxMallocMem xMallocMem,
 dxFree xFree,
 dxFreeInt xFreeInt,
 dxFreeMem xFreeMem,
 dxRealloc xRealloc,
 dxSize xSize,
 dxRoundup xRoundup,
 dxMemInit xInit,
 dxMemShutdown xShutdown,
 object pAppData
 )
 {
   this.xMalloc = xMalloc;
   this.xMallocInt = xMallocInt;
   this.xMallocMem = xMallocMem;
   this.xFree = xFree;
   this.xFreeInt = xFreeInt;
   this.xFreeMem = xFreeMem;
   this.xRealloc = xRealloc;
   this.xSize = xSize;
   this.xRoundup = xRoundup;
   this.xInit = xInit;
   this.xShutdown = xShutdown;
   this.pAppData = pAppData;
 }
示例#3
0
 /*
 ** Bind a new array array of integers to a specific intarray object.
 **
 ** The array of integers bound must be unchanged for the duration of
 ** any query against the corresponding virtual table.  If the integer
 ** array does change or is deallocated undefined behavior will result.
 */
 static int sqlite3_intarray_bind(
   sqlite3_intarray pIntArray,    /* The intarray object to bind to */
   int nElements,                 /* Number of elements in the intarray */
   sqlite3_int64[] aElements,     /* Content of the intarray */
   dxFree xFree//void (*xFree)(void*)           /* How to dispose of the intarray when done */
 )
 {
   if ( pIntArray.xFree != null )
   {
     pIntArray.a = null;//pIntArray.xFree( pIntArray.a );
   }
   pIntArray.n = nElements;
   pIntArray.a = aElements;
   pIntArray.xFree = xFree;
   return SQLITE_OK;
 }