FreeBSD/contrib/subversion/subversion/libsvn_subr/cache-membuffer.c
/* standard de-serialization function for svn_stringbuf_t items.
 * Implements svn_cache__deserialize_func_t.
 */
standard de-serialization function for svn_stringbuf_t items.
standard de - serialization function for svn_stringbuf_t items .
static svn_error_t *
deserialize_svn_stringbuf(void **item,
                          void *buffer,
                          apr_size_t buffer_size,
                          apr_pool_t *result_pool)
{
  svn_stringbuf_t *value_str = apr_palloc(result_pool, sizeof(svn_stringbuf_t));
  value_str->pool = result_pool;
  value_str->blocksize = buffer_size;
  value_str->data = buffer;
  value_str->len = buffer_size-1;
  *item = value_str;
  return SVN_NO_ERROR;
}
static svn_error_t * deserialize_svn_stringbuf ( void * * item , void * buffer , apr_size_t buffer_size , apr_pool_t * result_pool ) { svn_stringbuf_t * value_str = apr_palloc ( result_pool , sizeof ( svn_stringbuf_t ) ) ; value_str -> pool = result_pool ; value_str -> blocksize = buffer_size ; value_str -> data = buffer ; value_str -> len = buffer_size - 1 ; * item = value_str ; return SVN_NO_ERROR ; }
standard de-serialization function for svn_stringbuf_t items.
standard de - serialization function for svn_stringbuf_t items .