bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] timespec: mark functions with const attributes


From: Paul Eggert
Subject: [PATCH] timespec: mark functions with const attributes
Date: Mon, 09 Jul 2012 00:54:38 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

 ChangeLog      |    6 ++++++
 lib/timespec.h |    9 ++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ce24403..6618aa8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-07-09  Paul Eggert  <address@hidden>
+
+       timespec: mark functions with const attributes
+       * lib/timespec.h (timespec_add, timespec_sub, dtotimespec):
+       Mark with _GL_ATTRIBUTE_CONST.
+
 2012-07-07  Ludovic Courtès  <address@hidden>
 
        canonicalize[-lgpl]: handle "guessing" values when cross-building
diff --git a/lib/timespec.h b/lib/timespec.h
index 388ddb8..a587079 100644
--- a/lib/timespec.h
+++ b/lib/timespec.h
@@ -65,9 +65,12 @@ timespec_sign (struct timespec a)
   return a.tv_sec < 0 ? -1 : a.tv_sec || a.tv_nsec;
 }
 
-struct timespec timespec_add (struct timespec, struct timespec);
-struct timespec timespec_sub (struct timespec, struct timespec);
-struct timespec dtotimespec (double);
+struct timespec timespec_add (struct timespec, struct timespec)
+  _GL_ATTRIBUTE_CONST;
+struct timespec timespec_sub (struct timespec, struct timespec)
+  _GL_ATTRIBUTE_CONST;
+struct timespec dtotimespec (double)
+  _GL_ATTRIBUTE_CONST;
 
 /* Return an approximation to A, of type 'double'.  */
 static inline double




reply via email to

[Prev in Thread] Current Thread [Next in Thread]