Changeset 2511 for pjproject/trunk
- Timestamp:
- Mar 13, 2009 12:28:00 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjlib-util/crc32.c
r1731 r2511 23 23 #define CRC32_INDEX(c) (c & 0xff) 24 24 #define CRC32_SHIFTED(c) (c >> 8) 25 #define CRC32_SWAP(c) (c) 25 26 26 27 static const pj_uint32_t crc_tab[] = { … … 83 84 #define CRC32_INDEX(c) (c >> 24) 84 85 #define CRC32_SHIFTED(c) (c << 8) 86 #define CRC32_SWAP(c) ((((c) & 0xff000000) >> 24) | \ 87 (((c) & 0x00ff0000) >> 8) | \ 88 (((c) & 0x0000ff00) << 8) | \ 89 (((c) & 0x000000ff) << 24)) 85 90 86 91 static const pj_uint32_t crc_tab[] = { … … 180 185 PJ_DEF(pj_uint32_t) pj_crc32_final(pj_crc32_context *ctx) 181 186 { 182 return ctx->crc_state;187 return CRC32_SWAP(ctx->crc_state); 183 188 } 184 189
Note: See TracChangeset
for help on using the changeset viewer.