bus: export utf8 validator calls as pure functions
authorLennart Poettering <lennart@poettering.net>
Mon, 11 Nov 2013 22:40:00 +0000 (23:40 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 11 Nov 2013 23:12:44 +0000 (00:12 +0100)
src/systemd/_sd-common.h
src/systemd/sd-utf8.h

index b0c48aa..594ff3d 100644 (file)
 #  define _sd_packed_ __attribute__((packed))
 #endif
 
+#ifndef _sd_pure_
+#  define _sd_pure_ __attribute__((pure))
+#endif
+
 #ifndef _SD_STRINGIFY
 #  define _SD_XSTRINGIFY(x) #x
 #  define _SD_STRINGIFY(x) _SD_XSTRINGIFY(x)
index 4a43eb7..205ee42 100644 (file)
@@ -26,8 +26,8 @@
 
 _SD_BEGIN_DECLARATIONS;
 
-const char *sd_utf8_is_valid(const char *s);
-const char *sd_ascii_is_valid(const char *s);
+_sd_pure_ const char *sd_utf8_is_valid(const char *s);
+_sd_pure_ const char *sd_ascii_is_valid(const char *s);
 
 _SD_END_DECLARATIONS;