mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
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:
parent
2464f00902
commit
be72b22964
@ -159,10 +159,10 @@ replace_token (char *string,
|
|||||||
|
|
||||||
/* NOTE: this assumes token and replacement are the same length */
|
/* NOTE: this assumes token and replacement are the same length */
|
||||||
|
|
||||||
while ((token_pos = _cogl_util_memmem (last_pos,
|
while ((token_pos = memmem (last_pos,
|
||||||
end - last_pos,
|
end - last_pos,
|
||||||
token,
|
token,
|
||||||
token_length)))
|
token_length)))
|
||||||
{
|
{
|
||||||
/* Make sure this isn't in the middle of some longer token */
|
/* Make sure this isn't in the middle of some longer token */
|
||||||
if ((token_pos <= string ||
|
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
|
/* Strip out the wrapper snippet we added when the source was
|
||||||
* specified */
|
* specified */
|
||||||
wrapper_start = _cogl_util_memmem (source,
|
wrapper_start = memmem (source,
|
||||||
copy_length,
|
copy_length,
|
||||||
wrapper_marker,
|
wrapper_marker,
|
||||||
sizeof (wrapper_marker) - 1);
|
sizeof (wrapper_marker) - 1);
|
||||||
if (wrapper_start)
|
if (wrapper_start)
|
||||||
{
|
{
|
||||||
length = wrapper_start - source;
|
length = wrapper_start - source;
|
||||||
|
@ -163,8 +163,6 @@ _cogl_util_pixel_format_from_masks (unsigned long r_mask,
|
|||||||
#define _COGL_STATIC_ASSERT(EXPRESSION, MESSAGE) \
|
#define _COGL_STATIC_ASSERT(EXPRESSION, MESSAGE) \
|
||||||
_Static_assert (EXPRESSION, MESSAGE);
|
_Static_assert (EXPRESSION, MESSAGE);
|
||||||
|
|
||||||
#define _cogl_util_memmem memmem
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
_cogl_util_scissor_intersect (int rect_x0,
|
_cogl_util_scissor_intersect (int rect_x0,
|
||||||
int rect_y0,
|
int rect_y0,
|
||||||
|
@ -272,6 +272,7 @@ endif
|
|||||||
required_functions = [
|
required_functions = [
|
||||||
'ffs',
|
'ffs',
|
||||||
'clz',
|
'clz',
|
||||||
|
'memmem',
|
||||||
]
|
]
|
||||||
foreach function : required_functions
|
foreach function : required_functions
|
||||||
if not cc.has_function(function)
|
if not cc.has_function(function)
|
||||||
|
Loading…
Reference in New Issue
Block a user