src/java.desktop/share/native/libfontmanager/harfbuzz/hb-map.cc
author jiefu
Fri, 15 Nov 2019 20:39:26 +0800
changeset 59110 8c4c358272a9
parent 54232 7c11a7cc7c1d
permissions -rw-r--r--
8234232: [TESTBUG] gc/shenandoah/jvmti/TestHeapDump.java fails with -Xcomp Reviewed-by: zgu
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
54232
7c11a7cc7c1d 8210782: Upgrade HarfBuzz to the latest 2.3.1
prr
parents: 50826
diff changeset
    27
#include "hb-map.hh"
50826
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
54232
7c11a7cc7c1d 8210782: Upgrade HarfBuzz to the latest 2.3.1
prr
parents: 50826
diff changeset
    30
/**
7c11a7cc7c1d 8210782: Upgrade HarfBuzz to the latest 2.3.1
prr
parents: 50826
diff changeset
    31
 * SECTION:hb-map
7c11a7cc7c1d 8210782: Upgrade HarfBuzz to the latest 2.3.1
prr
parents: 50826
diff changeset
    32
 * @title: hb-map
7c11a7cc7c1d 8210782: Upgrade HarfBuzz to the latest 2.3.1
prr
parents: 50826
diff changeset
    33
 * @short_description: Object representing integer to integer mapping
7c11a7cc7c1d 8210782: Upgrade HarfBuzz to the latest 2.3.1
prr
parents: 50826
diff changeset
    34
 * @include: hb.h
7c11a7cc7c1d 8210782: Upgrade HarfBuzz to the latest 2.3.1
prr
parents: 50826
diff changeset
    35
 *
7c11a7cc7c1d 8210782: Upgrade HarfBuzz to the latest 2.3.1
prr
parents: 50826
diff changeset
    36
 * Map objects are integer-to-integer hash-maps.  Currently they are
7c11a7cc7c1d 8210782: Upgrade HarfBuzz to the latest 2.3.1
prr
parents: 50826
diff changeset
    37
 * not used in the HarfBuzz public API, but are provided for client's
7c11a7cc7c1d 8210782: Upgrade HarfBuzz to the latest 2.3.1
prr
parents: 50826
diff changeset
    38
 * use if desired.
7c11a7cc7c1d 8210782: Upgrade HarfBuzz to the latest 2.3.1
prr
parents: 50826
diff changeset
    39
 **/
50826
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    40
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    41
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_create: (Xconstructor)
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
 * Return value: (transfer full):
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    46
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    47
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    48
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    49
hb_map_t *
54232
7c11a7cc7c1d 8210782: Upgrade HarfBuzz to the latest 2.3.1
prr
parents: 50826
diff changeset
    50
hb_map_create ()
50826
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
  hb_map_t *map;
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
  if (!(map = hb_object_create<hb_map_t> ()))
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    55
    return hb_map_get_empty ();
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    56
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    57
  map->init_shallow ();
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    58
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    59
  return map;
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    60
}
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    61
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
 * hb_map_get_empty:
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
 * Return value: (transfer full):
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
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    68
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    69
hb_map_t *
54232
7c11a7cc7c1d 8210782: Upgrade HarfBuzz to the latest 2.3.1
prr
parents: 50826
diff changeset
    70
hb_map_get_empty ()
50826
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
  return const_cast<hb_map_t *> (&Null(hb_map_t));
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
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    75
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    76
 * hb_map_reference: (skip)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    77
 * @map: a 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
 * Return value: (transfer full):
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
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    82
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    83
hb_map_t *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    84
hb_map_reference (hb_map_t *map)
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
  return hb_object_reference (map);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    87
}
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
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    90
 * hb_map_destroy: (skip)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    91
 * @map: a map.
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
 * Since: 1.7.7
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
void
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    96
hb_map_destroy (hb_map_t *map)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    97
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    98
  if (!hb_object_destroy (map)) return;
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    99
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   100
  map->fini_shallow ();
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   101
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   102
  free (map);
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
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
 * hb_map_set_user_data: (skip)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   107
 * @map: a map.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   108
 * @key:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   109
 * @data:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   110
 * @destroy:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   111
 * @replace:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   112
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   113
 * Return value:
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
 * Since: 1.7.7
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
hb_bool_t
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   118
hb_map_set_user_data (hb_map_t           *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   119
                      hb_user_data_key_t *key,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   120
                      void *              data,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   121
                      hb_destroy_func_t   destroy,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   122
                      hb_bool_t           replace)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   123
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   124
  return hb_object_set_user_data (map, key, data, destroy, replace);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   125
}
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
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   128
 * hb_map_get_user_data: (skip)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   129
 * @map: a map.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   130
 * @key:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   131
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   132
 * Return value: (transfer none):
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
 * Since: 1.7.7
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
void *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   137
hb_map_get_user_data (hb_map_t           *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   138
                      hb_user_data_key_t *key)
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
  return hb_object_get_user_data (map, key);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   141
}
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
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_map_allocation_successful:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   146
 * @map: a 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
 *
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
 * Return value:
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
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   153
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   154
hb_bool_t
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   155
hb_map_allocation_successful (const hb_map_t  *map)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   156
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   157
  return map->successful;
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
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
 * hb_map_set:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   163
 * @map: a map.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   164
 * @key:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   165
 * @value:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   166
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   167
 *
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
 * Since: 1.7.7
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
void
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   172
hb_map_set (hb_map_t       *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   173
            hb_codepoint_t  key,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   174
            hb_codepoint_t  value)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   175
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   176
  map->set (key, value);
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
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   180
 * hb_map_get:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   181
 * @map: a map.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   182
 * @key:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   183
 *
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
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   186
 * Since: 1.7.7
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
hb_codepoint_t
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   189
hb_map_get (const hb_map_t *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   190
            hb_codepoint_t  key)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   191
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   192
  return map->get (key);
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
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   196
 * hb_map_del:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   197
 * @map: a map.
54232
7c11a7cc7c1d 8210782: Upgrade HarfBuzz to the latest 2.3.1
prr
parents: 50826
diff changeset
   198
 * @key:
50826
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   199
 *
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
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   202
 * Since: 1.7.7
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
void
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   205
hb_map_del (hb_map_t       *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   206
            hb_codepoint_t  key)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   207
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   208
  map->del (key);
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
/**
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   212
 * hb_map_has:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   213
 * @map: a map.
54232
7c11a7cc7c1d 8210782: Upgrade HarfBuzz to the latest 2.3.1
prr
parents: 50826
diff changeset
   214
 * @key:
50826
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   215
 *
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
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   218
 * Since: 1.7.7
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
hb_bool_t
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   221
hb_map_has (const hb_map_t *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   222
            hb_codepoint_t  key)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   223
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   224
  return map->has (key);
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
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
 * hb_map_clear:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   230
 * @map: a 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
 *
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
 * Since: 1.7.7
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
void
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   237
hb_map_clear (hb_map_t *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
  return map->clear ();
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
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_map_is_empty:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   244
 * @map: a 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
 *
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
 * Since: 1.7.7
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_bool_t
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   251
hb_map_is_empty (const hb_map_t *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
  return map->is_empty ();
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
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
 * hb_map_get_population:
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   258
 * @map: a 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
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   261
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   262
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   263
 **/
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   264
unsigned int
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   265
hb_map_get_population (const hb_map_t *map)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   266
{
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   267
  return map->get_population ();
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   268
}