]> git.notmuchmail.org Git - notmuch/commitdiff
lib: Add some missing static qualifiers.
authorCarl Worth <cworth@cworth.org>
Tue, 2 Nov 2010 04:58:43 +0000 (21:58 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 2 Nov 2010 04:58:43 +0000 (21:58 -0700)
These various functions and data are all used only locally, so should
be marked static. Ensuring we get these right will avoid us accidentally
leaking unintended symbols through the library interface.

lib/database.cc
lib/directory.cc
lib/index.cc
lib/thread.cc

index e4ac970f4bc597398750a60ca0988e59c6c700c1..414460d276b31f7df23895d51749540fc4876c47 100644 (file)
@@ -185,7 +185,7 @@ typedef struct {
  * nearly universal to all mail messages).
  */
 
  * nearly universal to all mail messages).
  */
 
-prefix_t BOOLEAN_PREFIX_INTERNAL[] = {
+static prefix_t BOOLEAN_PREFIX_INTERNAL[] = {
     { "type",                  "T" },
     { "reference",             "XREFERENCE" },
     { "replyto",               "XREPLYTO" },
     { "type",                  "T" },
     { "reference",             "XREFERENCE" },
     { "replyto",               "XREPLYTO" },
@@ -194,14 +194,14 @@ prefix_t BOOLEAN_PREFIX_INTERNAL[] = {
     { "directory-direntry",    "XDDIRENTRY" },
 };
 
     { "directory-direntry",    "XDDIRENTRY" },
 };
 
-prefix_t BOOLEAN_PREFIX_EXTERNAL[] = {
+static prefix_t BOOLEAN_PREFIX_EXTERNAL[] = {
     { "thread",                        "G" },
     { "tag",                   "K" },
     { "is",                    "K" },
     { "id",                    "Q" }
 };
 
     { "thread",                        "G" },
     { "tag",                   "K" },
     { "is",                    "K" },
     { "id",                    "Q" }
 };
 
-prefix_t PROBABILISTIC_PREFIX[]= {
+static prefix_t PROBABILISTIC_PREFIX[]= {
     { "from",                  "XFROM" },
     { "to",                    "XTO" },
     { "attachment",            "XATTACHMENT" },
     { "from",                  "XFROM" },
     { "to",                    "XTO" },
     { "attachment",            "XATTACHMENT" },
index 5d673e2134d058b8010d96d9783d187e765b96a0..f576e33673bec51e2c5912c6a78447634416ba71 100644 (file)
@@ -52,7 +52,7 @@ _notmuch_filenames_destructor (notmuch_filenames_t *filenames)
  * iterating over the non-prefixed portion of terms sharing a common
  * prefix.
  */
  * iterating over the non-prefixed portion of terms sharing a common
  * prefix.
  */
-notmuch_filenames_t *
+static notmuch_filenames_t *
 _notmuch_filenames_create (void *ctx,
                           notmuch_database_t *notmuch,
                           const char *prefix)
 _notmuch_filenames_create (void *ctx,
                           notmuch_database_t *notmuch,
                           const char *prefix)
index 0d6640bce57e59a657f6d7287d68aac535bd5534..00478f8db53f054d7917705f9b18c073c8bfa098 100644 (file)
@@ -63,7 +63,7 @@ struct _NotmuchFilterDiscardUuencodeClass {
     GMimeFilterClass parent_class;
 };
 
     GMimeFilterClass parent_class;
 };
 
-GMimeFilter *notmuch_filter_discard_uuencode_new (void);
+static GMimeFilter *notmuch_filter_discard_uuencode_new (void);
 
 static void notmuch_filter_discard_uuencode_finalize (GObject *object);
 
 
 static void notmuch_filter_discard_uuencode_finalize (GObject *object);
 
@@ -195,7 +195,7 @@ filter_reset (GMimeFilter *gmime_filter)
  *
  * Returns: a new #NotmuchFilterDiscardUuencode filter.
  **/
  *
  * Returns: a new #NotmuchFilterDiscardUuencode filter.
  **/
-GMimeFilter *
+static GMimeFilter *
 notmuch_filter_discard_uuencode_new (void)
 {
     static GType type = 0;
 notmuch_filter_discard_uuencode_new (void)
 {
     static GType type = 0;
index 13872d46c781900865e8ca118a7027ff0665643e..c29140397feb78e81cbb284e8ae52df75e3df22f 100644 (file)
@@ -140,14 +140,14 @@ _complete_thread_authors (notmuch_thread_t *thread)
     thread->authors_array = NULL;
 }
 
     thread->authors_array = NULL;
 }
 
-/* clean up the uggly "Lastname, Firstname" format that some mail systems
+/* clean up the ugly "Lastname, Firstname" format that some mail systems
  * (most notably, Exchange) are creating to be "Firstname Lastname"
  * To make sure that we don't change other potential situations where a
  * comma is in the name, we check that we match one of these patterns
  * "Last, First" <first.last@company.com>
  * "Last, First MI" <first.mi.last@company.com>
  */
  * (most notably, Exchange) are creating to be "Firstname Lastname"
  * To make sure that we don't change other potential situations where a
  * comma is in the name, we check that we match one of these patterns
  * "Last, First" <first.last@company.com>
  * "Last, First MI" <first.mi.last@company.com>
  */
-char *
+static char *
 _thread_cleanup_author (notmuch_thread_t *thread,
                        const char *author, const char *from)
 {
 _thread_cleanup_author (notmuch_thread_t *thread,
                        const char *author, const char *from)
 {