Commits

Anonymous committed 62f78b4

cbits: Mark const pointers as such

const needs to come after the * to mark pointer itself as constant.

  • Participants
  • Parent commits 1f40aa0

Comments (0)

Files changed (1)

File cbits/cbits.c

  *      state0 != UTF8_ACCEPT, UTF8_REJECT
  *
  */
-uint8_t const *
-_hs_text_decode_utf8_state(uint16_t *dest, size_t *destoff,
-                           const uint8_t const *src, const uint8_t const *srcend,
+const uint8_t *
+_hs_text_decode_utf8_state(uint16_t *const dest, size_t *destoff,
+                           const uint8_t *const src, const uint8_t *const srcend,
                            uint32_t *codepoint0, uint32_t *state0)
 {
   uint16_t *d = dest + *destoff;
-  const uint8_t const *s = src;
+  const uint8_t *s = src;
   uint32_t state = *state0;
   uint32_t codepoint = *codepoint0;
 
 /*
  * Helper to decode buffer and discard final decoder state
  */
-uint8_t const *
-_hs_text_decode_utf8(uint16_t *dest, size_t *destoff,
-                     const uint8_t const *src, const uint8_t const *srcend)
+const uint8_t *
+_hs_text_decode_utf8(uint16_t *const dest, size_t *destoff,
+                     const uint8_t *const src, const uint8_t *const srcend)
 {
   uint32_t codepoint;
   uint32_t state = UTF8_ACCEPT;