This file is indexed.

/usr/include/eina-1/eina/eina_inline_stringshare.x is in libeina-dev 1.8.6-2.5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/* EINA - EFL data type library
 * Copyright (C) 2002-2008 Gustavo Sverzut Barbieri
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library;
 * if not, see <http://www.gnu.org/licenses/>.
 */

#ifndef EINA_STRINGSHARE_INLINE_H_
#define EINA_STRINGSHARE_INLINE_H_

#include <string.h>
#include "eina_stringshare.h"
/**
 * @addtogroup Eina_Stringshare_Group Stringshare
 *
 * @{
 */

/**
 * Replace the previously stringshared pointer with another stringshared pointer.
 *
 * The string pointed by @a p_str must be previously stringshared or
 * @c NULL and it will be eina_stringshare_del(). The new string must also
 * be stringshared and will be passed to eina_stringshare_ref() and then assigned to @c *p_str.
 * This function is identical to eina_stringshare_replace() except that it calls
 * eina_stringshare_ref() instead of eina_stringshare_add()
 *
 * @param p_str pointer to the stringhare to be replaced. Must not be
 *        @c NULL, but @c *p_str may be @c NULL as it is a valid
 *        stringshare handle.
 * @param news new string to replace with, may be @c NULL.
 *
 * @return #EINA_TRUE if the strings were different and thus replaced, #EINA_FALSE
 * if the strings were the same after shared.
 *
 * @since 1.8
 */
static inline Eina_Bool
eina_stringshare_refplace(Eina_Stringshare **p_str, Eina_Stringshare *news)
{
   if (*p_str == news) return EINA_FALSE;

   news = eina_stringshare_ref(news);
   eina_stringshare_del(*p_str);
   if (*p_str == news)
     return EINA_FALSE;
   *p_str = news;
   return EINA_TRUE;
}

/**
 * Replace the previously stringshared pointer with new content.
 *
 * The string pointed by @a p_str must be previously stringshared or
 * @c NULL and it will be eina_stringshare_del(). The new string will
 * be passed to eina_stringshare_add() and then assigned to @c *p_str.
 *
 * @param p_str pointer to the stringhare to be replaced. Must not be
 *        @c NULL, but @c *p_str may be @c NULL as it is a valid
 *        stringshare handle.
 * @param news new string to be stringshared, may be @c NULL.
 *
 * @return #EINA_TRUE if the strings were different and thus replaced, #EINA_FALSE
 * if the strings were the same after shared.
 */
static inline Eina_Bool
eina_stringshare_replace(Eina_Stringshare **p_str, const char *news)
{
   if (*p_str == news) return EINA_FALSE;

   news = eina_stringshare_add(news);
   eina_stringshare_del(*p_str);
   if (*p_str == news)
     return EINA_FALSE;
   *p_str = news;
   return EINA_TRUE;
}

/**
 * Replace the previously stringshared pointer with a new content.
 *
 * The string pointed by @a p_str must be previously stringshared or
 * @c NULL and it will be eina_stringshare_del(). The new string will
 * be passed to eina_stringshare_add_length() and then assigned to @c *p_str.
 *
 * @param p_str pointer to the stringhare to be replaced. Must not be
 *        @c NULL, but @c *p_str may be @c NULL as it is a valid
 *        stringshare handle.
 * @param news new string to be stringshared, may be @c NULL.
 * @param slen The string size (<= strlen(str)).
 *
 * @return #EINA_TRUE if the strings were different and thus replaced, #EINA_FALSE
 * if the strings were the same after shared.
 */
static inline Eina_Bool
eina_stringshare_replace_length(Eina_Stringshare **p_str, const char *news, unsigned int slen)
{
   if (*p_str == news) return EINA_FALSE;

   news = eina_stringshare_add_length(news, slen);
   eina_stringshare_del(*p_str);
   if (*p_str == news)
     return EINA_FALSE;
   *p_str = news;
   return EINA_TRUE;
}

/**
 * @}
 */

#endif /* EINA_STRINGSHARE_INLINE_H_ */