bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] quotearg: constify get_quoting_style parameters


From: Pádraig Brady
Subject: [PATCH] quotearg: constify get_quoting_style parameters
Date: Tue, 3 Nov 2015 11:02:39 +0000

* lib/quotearg.h (get_quoting_style): Mark parameter as const.
* lib/quotearg.c (get_quoting_style): Likewise.
---
 ChangeLog      | 6 ++++++
 lib/quotearg.c | 2 +-
 lib/quotearg.h | 2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2b8276f..81c5391 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-11-03  P??draig Brady  <address@hidden>
+
+       quotearg: constify get_quoting_style parameters
+       * lib/quotearg.h (get_quoting_style): Mark parameter as const.
+       * lib/quotearg.c (get_quoting_style): Likewise.
+
 2015-11-02  P??draig Brady  <address@hidden>
 
        quotearg: add support for $'' shell escaping
diff --git a/lib/quotearg.c b/lib/quotearg.c
index 77896bf..8505081 100644
--- a/lib/quotearg.c
+++ b/lib/quotearg.c
@@ -120,7 +120,7 @@ clone_quoting_options (struct quoting_options *o)
 
 /* Get the value of O's quoting style.  If O is null, use the default.  */
 enum quoting_style
-get_quoting_style (struct quoting_options *o)
+get_quoting_style (struct quoting_options const *o)
 {
   return (o ? o : &default_quoting_options)->style;
 }
diff --git a/lib/quotearg.h b/lib/quotearg.h
index 2b7c93c..edee3b5 100644
--- a/lib/quotearg.h
+++ b/lib/quotearg.h
@@ -278,7 +278,7 @@ struct quoting_options;
 struct quoting_options *clone_quoting_options (struct quoting_options *o);
 
 /* Get the value of O's quoting style.  If O is null, use the default.  */
-enum quoting_style get_quoting_style (struct quoting_options *o);
+enum quoting_style get_quoting_style (struct quoting_options const *o);
 
 /* In O (or in the default if O is null),
    set the value of the quoting style to S.  */
-- 
2.5.0




reply via email to

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