src/java.desktop/share/native/libfontmanager/harfbuzz/hb-map.cc
author prr
Thu, 21 Jun 2018 12:54:30 -0700
changeset 50826 f5b95be8b6e2
child 54232 7c11a7cc7c1d
permissions -rw-r--r--
8205441: Upgrade to harfbuzz 1.8.1 Reviewed-by: serb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50826
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     1
/*
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     2
 * Copyright © 2018  Google, Inc.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     3
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     4
 *  This is part of HarfBuzz, a text shaping library.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     5
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     6
 * Permission is hereby granted, without written agreement and without
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     7
 * license or royalty fees, to use, copy, modify, and distribute this
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     8
 * software and its documentation for any purpose, provided that the
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     9
 * above copyright notice and the following two paragraphs appear in
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    10
 * all copies of this software.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    11
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    12
 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    13
 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    14
 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    15
 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    16
 * DAMAGE.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    17
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    18
 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    19
 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    20
 * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    21
 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    22
 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    23
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    24
 * Google Author(s): Behdad Esfahbod
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    25
 */
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    26
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    27
#include "hb-map-private.hh"
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    28
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    29
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    30
/* Public API */
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    31
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    32
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    33
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    34
 * hb_map_create: (Xconstructor)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    35
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    36
 * Return value: (transfer full):
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    37
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    38
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    39
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    40
hb_map_t *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    41
hb_map_create (void)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    42
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    43
  hb_map_t *map;
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    44
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    45
  if (!(map = hb_object_create<hb_map_t> ()))
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    46
    return hb_map_get_empty ();
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    47
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    48
  map->init_shallow ();
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    49
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    50
  return map;
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    51
}
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    52
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    53
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    54
 * hb_map_get_empty:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    55
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    56
 * Return value: (transfer full):
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    57
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    58
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    59
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    60
hb_map_t *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    61
hb_map_get_empty (void)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    62
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    63
  return const_cast<hb_map_t *> (&Null(hb_map_t));
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    64
}
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    65
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    66
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    67
 * hb_map_reference: (skip)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    68
 * @map: a map.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    69
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    70
 * Return value: (transfer full):
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    71
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    72
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    73
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    74
hb_map_t *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    75
hb_map_reference (hb_map_t *map)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    76
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    77
  return hb_object_reference (map);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    78
}
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    79
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    80
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    81
 * hb_map_destroy: (skip)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    82
 * @map: a map.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    83
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    84
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    85
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    86
void
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    87
hb_map_destroy (hb_map_t *map)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    88
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    89
  if (!hb_object_destroy (map)) return;
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    90
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    91
  map->fini_shallow ();
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    92
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    93
  free (map);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    94
}
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    95
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    96
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    97
 * hb_map_set_user_data: (skip)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    98
 * @map: a map.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    99
 * @key:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   100
 * @data:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   101
 * @destroy:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   102
 * @replace:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   103
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   104
 * Return value:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   105
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   106
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   107
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   108
hb_bool_t
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   109
hb_map_set_user_data (hb_map_t           *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   110
                      hb_user_data_key_t *key,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   111
                      void *              data,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   112
                      hb_destroy_func_t   destroy,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   113
                      hb_bool_t           replace)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   114
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   115
  return hb_object_set_user_data (map, key, data, destroy, replace);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   116
}
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   117
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   118
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   119
 * hb_map_get_user_data: (skip)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   120
 * @map: a map.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   121
 * @key:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   122
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   123
 * Return value: (transfer none):
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   124
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   125
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   126
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   127
void *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   128
hb_map_get_user_data (hb_map_t           *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   129
                      hb_user_data_key_t *key)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   130
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   131
  return hb_object_get_user_data (map, key);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   132
}
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   133
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   134
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   135
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   136
 * hb_map_allocation_successful:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   137
 * @map: a map.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   138
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   139
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   140
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   141
 * Return value:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   142
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   143
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   144
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   145
hb_bool_t
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   146
hb_map_allocation_successful (const hb_map_t  *map)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   147
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   148
  return map->successful;
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   149
}
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   150
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   151
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   152
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   153
 * hb_map_set:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   154
 * @map: a map.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   155
 * @key:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   156
 * @value:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   157
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   158
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   159
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   160
 * Return value:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   161
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   162
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   163
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   164
void
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   165
hb_map_set (hb_map_t       *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   166
            hb_codepoint_t  key,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   167
            hb_codepoint_t  value)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   168
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   169
  map->set (key, value);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   170
}
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   171
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   172
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   173
 * hb_map_get:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   174
 * @map: a map.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   175
 * @key:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   176
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   177
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   178
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   179
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   180
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   181
hb_codepoint_t
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   182
hb_map_get (const hb_map_t *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   183
            hb_codepoint_t  key)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   184
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   185
  return map->get (key);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   186
}
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   187
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   188
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   189
 * hb_map_del:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   190
 * @map: a map.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   191
 * @codepoint:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   192
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   193
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   194
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   195
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   196
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   197
void
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   198
hb_map_del (hb_map_t       *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   199
            hb_codepoint_t  key)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   200
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   201
  map->del (key);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   202
}
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   203
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   204
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   205
 * hb_map_has:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   206
 * @map: a map.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   207
 * @codepoint:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   208
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   209
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   210
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   211
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   212
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   213
hb_bool_t
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   214
hb_map_has (const hb_map_t *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   215
            hb_codepoint_t  key)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   216
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   217
  return map->has (key);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   218
}
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   219
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   220
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   221
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   222
 * hb_map_clear:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   223
 * @map: a map.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   224
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   225
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   226
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   227
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   228
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   229
void
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   230
hb_map_clear (hb_map_t *map)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   231
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   232
  return map->clear ();
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   233
}
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   234
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   235
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   236
 * hb_map_is_empty:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   237
 * @map: a map.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   238
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   239
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   240
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   241
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   242
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   243
hb_bool_t
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   244
hb_map_is_empty (const hb_map_t *map)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   245
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   246
  return map->is_empty ();
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   247
}
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   248
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   249
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   250
 * hb_map_get_population:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   251
 * @map: a map.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   252
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   253
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   254
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   255
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   256
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   257
unsigned int
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   258
hb_map_get_population (const hb_map_t *map)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   259
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   260
  return map->get_population ();
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   261
}