/ Check-in [1660efbe]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Make subroutines sampleCopy() and valueFromExpr() have file scope.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1660efbe46439734c7dc1674994ceb86a9b41d1a
User & Date: drh 2013-10-14 13:21:00
Context
2013-10-14
14:21
Corrects to comments on the STAT4 implementation. check-in: e06f74d3 user: drh tags: trunk
13:21
Make subroutines sampleCopy() and valueFromExpr() have file scope. check-in: 1660efbe user: drh tags: trunk
10:46
Add a new application_id for GeoPackage version 1.0. check-in: 98ddfe45 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/analyze.c.

   440    440     return (nEqNew==nEqOld && pNew->iHash>pOld->iHash);
   441    441   #endif
   442    442   }
   443    443   
   444    444   /*
   445    445   ** Copy the contents of object (*pFrom) into (*pTo).
   446    446   */
   447         -void sampleCopy(Stat4Accum *p, Stat4Sample *pTo, Stat4Sample *pFrom){
          447  +static void sampleCopy(Stat4Accum *p, Stat4Sample *pTo, Stat4Sample *pFrom){
   448    448     pTo->iRowid = pFrom->iRowid;
   449    449     pTo->isPSample = pFrom->isPSample;
   450    450     pTo->iCol = pFrom->iCol;
   451    451     pTo->iHash = pFrom->iHash;
   452    452     memcpy(pTo->anEq, pFrom->anEq, sizeof(tRowcnt)*p->nCol);
   453    453     memcpy(pTo->anLt, pFrom->anLt, sizeof(tRowcnt)*p->nCol);
   454    454     memcpy(pTo->anDLt, pFrom->anDLt, sizeof(tRowcnt)*p->nCol);

Changes to src/vdbemem.c.

  1071   1071   ** using valueNew().
  1072   1072   **
  1073   1073   ** If pCtx is NULL and an error occurs after the sqlite3_value object
  1074   1074   ** has been allocated, it is freed before returning. Or, if pCtx is not
  1075   1075   ** NULL, it is assumed that the caller will free any allocated object
  1076   1076   ** in all cases.
  1077   1077   */
  1078         -int valueFromExpr(
         1078  +static int valueFromExpr(
  1079   1079     sqlite3 *db,                    /* The database connection */
  1080   1080     Expr *pExpr,                    /* The expression to evaluate */
  1081   1081     u8 enc,                         /* Encoding to use */
  1082   1082     u8 affinity,                    /* Affinity to use */
  1083   1083     sqlite3_value **ppVal,          /* Write the new value here */
  1084   1084     struct ValueNewStat4Ctx *pCtx   /* Second argument for valueNew() */
  1085   1085   ){