Changeset 6829afc for text.c


Ignore:
Timestamp:
Jun 25, 2011, 3:26:15 AM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
12294d2
Parents:
95b52d1
git-author:
David Benjamin <davidben@mit.edu> (06/24/11 22:56:15)
git-committer:
David Benjamin <davidben@mit.edu> (06/25/11 03:26:15)
Message:
Define CALLER_OWN macro

Replace our exising uses of G_GNUC_WARN_UNUSED_RESULT with it. The
old macro is just way too long. This also more clearly specifies the
intent.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • text.c

    rd427f08 r6829afc  
    77/* Returns a copy of 'in' with each line indented 'n'
    88 * characters. Result must be freed with g_free. */
    9 G_GNUC_WARN_UNUSED_RESULT char *owl_text_indent(const char *in, int n)
     9CALLER_OWN char *owl_text_indent(const char *in, int n)
    1010{
    1111  const char *ptr1, *ptr2, *last;
     
    4848
    4949/* caller must free the return */
    50 G_GNUC_WARN_UNUSED_RESULT char *owl_text_htmlstrip(const char *in)
     50CALLER_OWN char *owl_text_htmlstrip(const char *in)
    5151{
    5252  const char *ptr1, *end, *ptr2, *ptr3;
     
    129129
    130130/* Caller must free return */
    131 G_GNUC_WARN_UNUSED_RESULT char *owl_text_expand_tabs(const char *in)
     131CALLER_OWN char *owl_text_expand_tabs(const char *in)
    132132{
    133133  int len = 0;
     
    188188
    189189/* caller must free the return */
    190 G_GNUC_WARN_UNUSED_RESULT char *owl_text_wordwrap(const char *in, int col)
     190CALLER_OWN char *owl_text_wordwrap(const char *in, int col)
    191191{
    192192  char *out;
     
    269269 * Caller must free returned string.
    270270 */
    271 G_GNUC_WARN_UNUSED_RESULT char *owl_text_substitute(const char *in, const char *from, const char *to)
     271CALLER_OWN char *owl_text_substitute(const char *in, const char *from, const char *to)
    272272{
    273273  char **split = g_strsplit(in, from, 0), *out;
     
    284284 * On success returns the string, on error returns NULL.
    285285 */
    286 G_GNUC_WARN_UNUSED_RESULT char *owl_text_quote(const char *in, const char *toquote, const char *quotestr)
     286CALLER_OWN char *owl_text_quote(const char *in, const char *toquote, const char *quotestr)
    287287{
    288288  int i, x, r, place, escape;
Note: See TracChangeset for help on using the changeset viewer.