diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-25 18:26:51 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-25 18:26:51 +0100 |
commit | 0ce036ce7fa040410fda6baceaceb43989a1de0c (patch) | |
tree | 43555cef54d029a0da94fcc5afe75eae7acb9963 /src | |
parent | 99e0f83e0bcc54dbc2b3a4f3fdd15fcd3033b21e (diff) |
bus: add a bit of pure/const decorators
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd-bus/bus-gvariant.h | 6 | ||||
-rw-r--r-- | src/libsystemd-bus/bus-internal.h | 22 | ||||
-rw-r--r-- | src/libsystemd-bus/bus-type.h | 16 |
3 files changed, 22 insertions, 22 deletions
diff --git a/src/libsystemd-bus/bus-gvariant.h b/src/libsystemd-bus/bus-gvariant.h index 435e8f1060..b4bd2a50f0 100644 --- a/src/libsystemd-bus/bus-gvariant.h +++ b/src/libsystemd-bus/bus-gvariant.h @@ -21,6 +21,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -int bus_gvariant_get_size(const char *signature); -int bus_gvariant_get_alignment(const char *signature); -int bus_gvariant_is_fixed_size(const char *signature); +int bus_gvariant_get_size(const char *signature) _pure_; +int bus_gvariant_get_alignment(const char *signature) _pure_; +int bus_gvariant_is_fixed_size(const char *signature) _pure_; diff --git a/src/libsystemd-bus/bus-internal.h b/src/libsystemd-bus/bus-internal.h index c73ceb4a06..321070d0e5 100644 --- a/src/libsystemd-bus/bus-internal.h +++ b/src/libsystemd-bus/bus-internal.h @@ -286,20 +286,20 @@ struct sd_bus { #define BUS_EXEC_ARGV_MAX 256 -bool interface_name_is_valid(const char *p); -bool service_name_is_valid(const char *p); -bool member_name_is_valid(const char *p); -bool object_path_is_valid(const char *p); -char *object_path_startswith(const char *a, const char *b); +bool interface_name_is_valid(const char *p) _pure_; +bool service_name_is_valid(const char *p) _pure_; +bool member_name_is_valid(const char *p) _pure_; +bool object_path_is_valid(const char *p) _pure_; +char *object_path_startswith(const char *a, const char *b) _pure_; -bool namespace_complex_pattern(const char *pattern, const char *value); -bool path_complex_pattern(const char *pattern, const char *value); +bool namespace_complex_pattern(const char *pattern, const char *value) _pure_; +bool path_complex_pattern(const char *pattern, const char *value) _pure_; -bool namespace_simple_pattern(const char *pattern, const char *value); -bool path_simple_pattern(const char *pattern, const char *value); +bool namespace_simple_pattern(const char *pattern, const char *value) _pure_; +bool path_simple_pattern(const char *pattern, const char *value) _pure_; -int bus_message_type_from_string(const char *s, uint8_t *u); -const char *bus_message_type_to_string(uint8_t u); +int bus_message_type_from_string(const char *s, uint8_t *u) _pure_; +const char *bus_message_type_to_string(uint8_t u) _pure_; #define error_name_is_valid interface_name_is_valid diff --git a/src/libsystemd-bus/bus-type.h b/src/libsystemd-bus/bus-type.h index d7b96b1102..2e423bbfdb 100644 --- a/src/libsystemd-bus/bus-type.h +++ b/src/libsystemd-bus/bus-type.h @@ -26,11 +26,11 @@ #include "sd-bus.h" #include "sd-bus-protocol.h" -bool bus_type_is_valid(char c); -bool bus_type_is_valid_in_signature(char c); -bool bus_type_is_basic(char c); -bool bus_type_is_trivial(char c); -bool bus_type_is_container(char c); - -int bus_type_get_alignment(char c); -int bus_type_get_size(char c); +bool bus_type_is_valid(char c) _const_; +bool bus_type_is_valid_in_signature(char c) _const_; +bool bus_type_is_basic(char c) _const_; +bool bus_type_is_trivial(char c) _const_; +bool bus_type_is_container(char c) _const_; + +int bus_type_get_alignment(char c) _const_; +int bus_type_get_size(char c) _const_; |