1
0
Fork 0

cogl: Remove cogl_util_memmem() macro

`cogl_util_memmem` was used as a wrapper in case `memmem` wasn't
defined, but since commit 46942c24 these are required. In case of
`memmem`, we didn't explicitly require this in the meson build files, so
add that as well.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/629
This commit is contained in:
Niels De Graef 2019-06-17 23:20:10 +02:00
parent 2464f00902
commit be72b22964
3 changed files with 9 additions and 10 deletions

View file

@ -159,10 +159,10 @@ replace_token (char *string,
/* NOTE: this assumes token and replacement are the same length */
while ((token_pos = _cogl_util_memmem (last_pos,
end - last_pos,
token,
token_length)))
while ((token_pos = memmem (last_pos,
end - last_pos,
token,
token_length)))
{
/* Make sure this isn't in the middle of some longer token */
if ((token_pos <= string ||
@ -908,10 +908,10 @@ gl_get_shader_source_wrapper (GLuint shader,
/* Strip out the wrapper snippet we added when the source was
* specified */
wrapper_start = _cogl_util_memmem (source,
copy_length,
wrapper_marker,
sizeof (wrapper_marker) - 1);
wrapper_start = memmem (source,
copy_length,
wrapper_marker,
sizeof (wrapper_marker) - 1);
if (wrapper_start)
{
length = wrapper_start - source;

View file

@ -163,8 +163,6 @@ _cogl_util_pixel_format_from_masks (unsigned long r_mask,
#define _COGL_STATIC_ASSERT(EXPRESSION, MESSAGE) \
_Static_assert (EXPRESSION, MESSAGE);
#define _cogl_util_memmem memmem
static inline void
_cogl_util_scissor_intersect (int rect_x0,
int rect_y0,

View file

@ -272,6 +272,7 @@ endif
required_functions = [
'ffs',
'clz',
'memmem',
]
foreach function : required_functions
if not cc.has_function(function)