mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 16:37:19 +09:00
string-table: annotate _to_string and _from_string with _const_ and _pure_, respectively
Follow-up for c94f6ab1bf
This commit is contained in:
@@ -8,14 +8,12 @@
|
||||
|
||||
#include "macro.h"
|
||||
|
||||
const char* string_table_lookup_to_string(const char * const *table, size_t len, ssize_t i);
|
||||
const char* string_table_lookup_to_string(const char * const *table, size_t len, ssize_t i) _const_;
|
||||
|
||||
ssize_t string_table_lookup_from_string(const char * const *table, size_t len, const char *key);
|
||||
|
||||
ssize_t string_table_lookup_from_string_with_boolean(const char * const *table, size_t len, const char *key, ssize_t yes);
|
||||
ssize_t string_table_lookup_from_string(const char * const *table, size_t len, const char *key) _pure_;
|
||||
ssize_t string_table_lookup_from_string_with_boolean(const char * const *table, size_t len, const char *key, ssize_t yes) _pure_;
|
||||
|
||||
int string_table_lookup_to_string_fallback(const char * const *table, size_t len, ssize_t i, size_t max, char **ret);
|
||||
|
||||
ssize_t string_table_lookup_from_string_fallback(const char * const *table, size_t len, const char *s, size_t max);
|
||||
|
||||
/* For basic lookup tables with strictly enumerated entries */
|
||||
|
||||
Reference in New Issue
Block a user