Make rpmfc token and apply tables readonly
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 6 Mar 2008 17:57:01 +0000 (19:57 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 6 Mar 2008 17:57:01 +0000 (19:57 +0200)
build/rpmfc.c
build/rpmfc.h

index 1b4d745..c7e3528 100644 (file)
@@ -438,7 +438,7 @@ assert(EVR != NULL);
 
 /**
  */
-static struct rpmfcTokens_s rpmfcTokens[] = {
+static const struct rpmfcTokens_s const rpmfcTokens[] = {
   { "directory",               RPMFC_DIRECTORY|RPMFC_INCLUDE },
 
   { " shared object",          RPMFC_LIBRARY },
@@ -1098,14 +1098,14 @@ exit:
 #endif
 }
 
-typedef struct rpmfcApplyTbl_s {
+typedef const struct rpmfcApplyTbl_s {
     int (*func) (rpmfc fc);
     int colormask;
 } * rpmfcApplyTbl;
 
 /**
  */
-static struct rpmfcApplyTbl_s rpmfcApplyTable[] = {
+static const struct rpmfcApplyTbl_s const rpmfcApplyTable[] = {
     { rpmfcELF,                RPMFC_ELF },
     { rpmfcSCRIPT,     (RPMFC_SCRIPT|RPMFC_PERL) },
     { rpmfcSCRIPT,     (RPMFC_SCRIPT|RPMFC_PYTHON) },
index 66479aa..3af9769 100644 (file)
@@ -77,7 +77,7 @@ typedef       enum FCOLOR_e FCOLOR_t;
 
 /** \ingroup rpmfc
  */
-typedef struct rpmfcTokens_s * rpmfcToken;
+typedef const struct rpmfcTokens_s * rpmfcToken;
 
 /** \ingroup rpmfc
  * Return helper output.