mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-10 16:54:08 -05:00
Merge branch 'jk/c23-const-preserving-fixes-more' into next
Further work to adjust the codebase for C23 that changes functions like strchr() that discarded constness when they return a pointer into a const string to preserve constness. * jk/c23-const-preserving-fixes-more: git-compat-util: fix CONST_OUTPARAM typo and indentation
This commit is contained in:
@@ -464,7 +464,7 @@ report_fn get_warn_routine(void);
|
||||
void set_die_is_recursing_routine(int (*routine)(void));
|
||||
|
||||
/*
|
||||
* Check that an out-parameter that is "at least as const as" a matching
|
||||
* Check that an out-parameter is "at least as const as" a matching
|
||||
* in-parameter. For example, skip_prefix() will return "out" that is a subset
|
||||
* of "str". So:
|
||||
*
|
||||
@@ -476,7 +476,7 @@ void set_die_is_recursing_routine(int (*routine)(void));
|
||||
* See the skip_prefix macro below for an example of use.
|
||||
*/
|
||||
#define CONST_OUTPARAM(in, out) \
|
||||
((const char **)(0 ? ((*(out) = (in)),(out)) : (out)))
|
||||
((const char **)(0 ? ((*(out) = (in)),(out)) : (out)))
|
||||
|
||||
/*
|
||||
* If the string "str" begins with the string found in "prefix", return true.
|
||||
|
||||
Reference in New Issue
Block a user