]> mj.ucw.cz Git - libucw.git/commitdiff
Extended types: Fix constness issues
authorMartin Mares <mj@ucw.cz>
Tue, 5 Aug 2014 15:14:15 +0000 (17:14 +0200)
committerMartin Mares <mj@ucw.cz>
Tue, 5 Aug 2014 15:14:15 +0000 (17:14 +0200)
ucw/xtypes.c
ucw/xtypes.h

index da6486d310fd551212f046777f39651d3c19fd2e..08172b474d0a2a0d7b33e9f0ecf35bb735b123bb 100644 (file)
@@ -18,7 +18,7 @@ static const char * const fmt_names[] = {
   [XTYPE_FMT_PRETTY] = "pretty",
 };
 
-const char *xtype_parse_fmt(struct xtype *xt, const char *str, u32 *dest, struct mempool *pool)
+const char *xtype_parse_fmt(const struct xtype *xt, const char *str, u32 *dest, struct mempool *pool)
 {
   for (uint i=0; i < ARRAY_SIZE(fmt_names); i++)
     if (!strcmp(str, fmt_names[i]))
index 19a416093cc8426951f601e6cb53daf3eda6fa99..20edf1a965a78e1a6c82b2f33c6704bc199184b3 100644 (file)
@@ -93,7 +93,7 @@ struct xtype {
  *
  * The generic modes are called `default`, `raw`, and `pretty`.
  **/
-const char *xtype_parse_fmt(struct xtype *xt, const char *str, u32 *dest, struct mempool *pool);
+const char *xtype_parse_fmt(const struct xtype *xt, const char *str, u32 *dest, struct mempool *pool);
 
 /**
  * Construct a string representation of a formatting mode. It is a wrapper