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
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2e2cd82bacc7a952416dc114b1c20a2f19e9ca93
User & Date: stephan 2012-07-13 16:56:32.262
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
Unified Diff Ignore Whitespace Patch
Changes to src/blob.c.
1079
1080
1081
1082
1083
1084
1085











  assert( (pIn->iCursor+nLen)  <= pIn->nUsed );
  if( nLen ){
    memcpy( pDest, pIn->aData, nLen );
    pIn->iCursor += nLen;
  }
  return nLen;
}


















>
>
>
>
>
>
>
>
>
>
>
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
  assert( (pIn->iCursor+nLen)  <= pIn->nUsed );
  if( nLen ){
    memcpy( pDest, pIn->aData, nLen );
    pIn->iCursor += nLen;
  }
  return nLen;
}

/*
** Swaps the contents of the given blobs. Results
** are unspecified if either value is NULL or both
** point to the same blob.
*/
void blob_swap( Blob *pLeft, Blob *pRight ){
  Blob swap = *pLeft;
  *pLeft = *pRight;
  *pRight = swap;
}