~ubuntu-branches/ubuntu/wily/zeromq3/wily-proposed

« back to all changes in this revision

Viewing changes to src/wire.hpp

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2014-03-16 14:02:28 UTC
  • mfrom: (1.1.6) (6.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20140316140228-ig1sgh7czk59m9ux
Tags: 4.0.4+dfsg-1
* QA upload; orphan the package
  - Upload to unstable
* New upstream release
* Update repack.stub script
* Drop 02_fix-exported-symbols.patch and 03_fix-s390-rdtsc.patch
  (merged upstream)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
    Copyright (c) 2007-2009 iMatix Corporation
3
 
    Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
 
2
    Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file
4
3
 
5
4
    This file is part of 0MQ.
6
5
 
34
33
        *buffer_ = value;
35
34
    }
36
35
 
37
 
    inline uint8_t get_uint8 (unsigned char *buffer_)
 
36
    inline uint8_t get_uint8 (const unsigned char *buffer_)
38
37
    {
39
38
        return *buffer_;
40
39
    }
45
44
        buffer_ [1] = (unsigned char) (value & 0xff);
46
45
    }
47
46
 
48
 
    inline uint16_t get_uint16 (unsigned char *buffer_)
 
47
    inline uint16_t get_uint16 (const unsigned char *buffer_)
49
48
    {
50
49
        return
51
50
            (((uint16_t) buffer_ [0]) << 8) |
60
59
        buffer_ [3] = (unsigned char) (value & 0xff);
61
60
    }
62
61
 
63
 
    inline uint32_t get_uint32 (unsigned char *buffer_)
 
62
    inline uint32_t get_uint32 (const unsigned char *buffer_)
64
63
    {
65
64
        return
66
65
            (((uint32_t) buffer_ [0]) << 24) |
81
80
        buffer_ [7] = (unsigned char) (value & 0xff);
82
81
    }
83
82
 
84
 
    inline uint64_t get_uint64 (unsigned char *buffer_)
 
83
    inline uint64_t get_uint64 (const unsigned char *buffer_)
85
84
    {
86
85
        return
87
86
            (((uint64_t) buffer_ [0]) << 56) |