~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/serialize/binlog_encoding.h

  • Committer: Brian Aker
  • Date: 2008-11-03 21:00:47 UTC
  • mfrom: (520.9.5 devel)
  • Revision ID: brian@tangent.org-20081103210047-wfkeyyefrfl2vh4l
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
#define LENGTH_ENCODE_MAX_BYTES (sizeof(size_t) + 1)
10
10
 
 
11
using std::size_t;
 
12
 
11
13
inline unsigned char *
12
 
length_encode(size_t length, unsigned char *buf)
 
14
length_encode(std::size_t length, unsigned char *buf)
13
15
{
14
16
  unsigned char *ptr= buf;
15
17
  assert(length > 1);
38
40
      }
39
41
    }
40
42
    // Clear the remaining bytes up to the next power of two
41
 
    memset(ptr + 1, 0, pow2 - (ptr - buf));
 
43
    std::memset(ptr + 1, 0, pow2 - (ptr - buf));
42
44
    *buf= log2m1;
43
45
    ptr= buf + pow2 + 1;
44
46
  }