diff options
author | Milan Crha <mcrha@redhat.com> | 2011-02-25 23:20:41 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-02-25 23:20:41 +0800 |
commit | 1301cf02efdacd20fb5ce3e2554ae15b8f146e8a (patch) | |
tree | 8d5f3985a82ec7d330af27ee0a29a79a2f0ecfa3 /widgets/misc/e-searching-tokenizer.c | |
parent | 1a4be6c521d674c4a60e54203521e2721b81b921 (diff) | |
download | gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.gz gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.zst gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.zip |
Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly
Diffstat (limited to 'widgets/misc/e-searching-tokenizer.c')
-rw-r--r-- | widgets/misc/e-searching-tokenizer.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/widgets/misc/e-searching-tokenizer.c b/widgets/misc/e-searching-tokenizer.c index b2581799c1..087551fc76 100644 --- a/widgets/misc/e-searching-tokenizer.c +++ b/widgets/misc/e-searching-tokenizer.c @@ -37,10 +37,6 @@ #define d(x) -#define E_SEARCHING_TOKENIZER_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_SEARCHING_TOKENIZER, ESearchingTokenizerPrivate)) - enum { MATCH_SIGNAL, LAST_SIGNAL @@ -943,7 +939,7 @@ searching_tokenizer_finalize (GObject *object) { ESearchingTokenizerPrivate *priv; - priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (object); + priv = E_SEARCHING_TOKENIZER (object)->priv; search_info_free (priv->primary); search_info_free (priv->secondary); @@ -961,7 +957,7 @@ searching_tokenizer_begin (HTMLTokenizer *tokenizer, { ESearchingTokenizerPrivate *priv; - priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (tokenizer); + priv = E_SEARCHING_TOKENIZER (tokenizer)->priv; /* reset search */ if (priv->engine != NULL) { @@ -985,7 +981,7 @@ searching_tokenizer_peek_token (HTMLTokenizer *tokenizer) { ESearchingTokenizerPrivate *priv; - priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (tokenizer); + priv = E_SEARCHING_TOKENIZER (tokenizer)->priv; if (priv->engine != NULL) return searcher_peek_token (priv->engine); @@ -1002,7 +998,7 @@ searching_tokenizer_next_token (HTMLTokenizer *tokenizer) gint oldmatched; gchar *token; - priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (tokenizer); + priv = E_SEARCHING_TOKENIZER (tokenizer)->priv; /* If no search is active, just use the default method. */ if (priv->engine == NULL) @@ -1026,7 +1022,7 @@ searching_tokenizer_has_more (HTMLTokenizer *tokenizer) { ESearchingTokenizerPrivate *priv; - priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (tokenizer); + priv = E_SEARCHING_TOKENIZER (tokenizer)->priv; return (priv->engine != NULL && searcher_pending (priv->engine)) || HTML_TOKENIZER_CLASS (e_searching_tokenizer_parent_class)-> @@ -1084,7 +1080,7 @@ e_searching_tokenizer_class_init (ESearchingTokenizerClass *class) static void e_searching_tokenizer_init (ESearchingTokenizer *tokenizer) { - tokenizer->priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (tokenizer); + tokenizer->priv = G_TYPE_INSTANCE_GET_PRIVATE (tokenizer, E_TYPE_SEARCHING_TOKENIZER, ESearchingTokenizerPrivate); tokenizer->priv->primary = search_info_new (); search_info_set_flags ( |