Browse Source

TT#111150 remove obsolete str_chunk_insert

This leads to unaligned memory access, so remove it.

Change-Id: I4d7c6d42a58f20a0d69fbb933cb925e3bcf0c695
pull/1285/head
Richard Fuchs 5 years ago
parent
commit
b9d68914e6
1 changed files with 0 additions and 8 deletions
  1. +0
    -8
      lib/str.h

+ 0
- 8
lib/str.h View File

@ -68,8 +68,6 @@ INLINE void str_free_dup(str *out);
INLINE str *str_alloc(int len);
/* returns new str object allocated with malloc, including buffer */
INLINE str *str_dup(const str *s);
/* returns new str object allocated from chunk, including buffer */
INLINE str *str_chunk_insert(GStringChunk *c, const str *s);
/* shifts pointer by len chars and decrements len. returns -1 if buffer too short, 0 otherwise */
INLINE int str_shift(str *s, int len);
/* eats the supplied string from the beginning of s. returns -1 if string head doesn't match */
@ -123,12 +121,6 @@ str *str_uri_decode_len(const char *in, int in_len);
INLINE str *str_chunk_insert(GStringChunk *c, const str *s) {
str *i;
i = (void *) g_string_chunk_insert_len(c, (void *) s, sizeof(*s));
i->s = g_string_chunk_insert_len(c, s->s, s->len);
return i;
}
INLINE char *str_end(const str *s) {
return s->s + s->len;
}


Loading…
Cancel
Save