bus: add a bit of pure/const decorators

This commit is contained in:
Lennart Poettering 2013-12-25 18:26:51 +01:00
parent 99e0f83e0b
commit 0ce036ce7f
3 changed files with 21 additions and 21 deletions

View File

@ -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_;

View File

@ -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

View File

@ -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);
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);
int bus_type_get_size(char c);
int bus_type_get_alignment(char c) _const_;
int bus_type_get_size(char c) _const_;