Fossil

Check-in [2e2cd82b]
Login

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

Overview
Comment:Added blob_swap() to simplify some json code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2e2cd82bacc7a952416dc114b1c20a2f19e9ca93
User & Date: stephan 2012-07-13 16:56:32
Context
2012-07-13
16:56
help text updates. check-in: 91a740e8 user: stephan tags: trunk
16:56
Added blob_swap() to simplify some json code. check-in: 2e2cd82b user: stephan tags: trunk
16:56
Fixed a segfault which could/did happen when running content through wikification in CLI mode (which g.zTop is not set). check-in: a3dd2cfe user: stephan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/blob.c.

  1079   1079     assert( (pIn->iCursor+nLen)  <= pIn->nUsed );
  1080   1080     if( nLen ){
  1081   1081       memcpy( pDest, pIn->aData, nLen );
  1082   1082       pIn->iCursor += nLen;
  1083   1083     }
  1084   1084     return nLen;
  1085   1085   }
         1086  +
         1087  +/*
         1088  +** Swaps the contents of the given blobs. Results
         1089  +** are unspecified if either value is NULL or both
         1090  +** point to the same blob.
         1091  +*/
         1092  +void blob_swap( Blob *pLeft, Blob *pRight ){
         1093  +  Blob swap = *pLeft;
         1094  +  *pLeft = *pRight;
         1095  +  *pRight = swap;
         1096  +}