Coverage Report

Created: 2025-08-29 06:09

/src/aspell/lib/string_enumeration-c.cpp
Line
Count
Source (jump to first uncovered line)
1
/* Automatically generated file.  Do not edit directly. */
2
3
/* This file is part of The New Aspell
4
 * Copyright (C) 2001-2002 by Kevin Atkinson under the GNU LGPL
5
 * license version 2.0 or 2.1.  You should have received a copy of the
6
 * LGPL license along with this library if you did not you can find it
7
 * at http://www.gnu.org/.                                              */
8
9
#include "convert.hpp"
10
#include "string_enumeration.hpp"
11
12
namespace acommon {
13
14
class StringEnumeration;
15
16
extern "C" void delete_aspell_string_enumeration(StringEnumeration * ths)
17
8.89k
{
18
8.89k
  delete ths;
19
8.89k
}
20
21
extern "C" StringEnumeration * aspell_string_enumeration_clone(const StringEnumeration * ths)
22
0
{
23
0
  return ths->clone();
24
0
}
25
26
extern "C" void aspell_string_enumeration_assign(StringEnumeration * ths, const StringEnumeration * other)
27
0
{
28
0
  ths->assign(other);
29
0
}
30
31
extern "C" int aspell_string_enumeration_at_end(const StringEnumeration * ths)
32
0
{
33
0
  return ths->at_end();
34
0
}
35
36
extern "C" const char * aspell_string_enumeration_next(StringEnumeration * ths)
37
568k
{
38
568k
  const char * s = ths->next();
39
568k
  if (s == 0 || ths->from_internal_ == 0) {
40
8.89k
    return s;
41
559k
  } else {
42
559k
    ths->temp_str.clear();
43
559k
    ths->from_internal_->convert(s,-1,ths->temp_str);
44
559k
    ths->from_internal_->append_null(ths->temp_str);
45
559k
    return ths->temp_str.data();
46
559k
  }
47
568k
}
48
49
extern "C" const void * aspell_string_enumeration_next_wide(StringEnumeration * ths, int type_width)
50
0
{
51
0
  const char * s = ths->next();
52
0
  if (s == 0) {
53
0
    return s;
54
0
  } else if (ths->from_internal_ == 0) {
55
0
    assert(type_width == 1);
56
0
    return s;
57
0
  } else {
58
0
    assert(type_width == ths->from_internal_->out_type_width());
59
0
    ths->temp_str.clear();
60
0
    ths->from_internal_->convert(s,-1,ths->temp_str);
61
0
    ths->from_internal_->append_null(ths->temp_str);
62
0
    return ths->temp_str.data();
63
0
  }
64
0
}
65
66
67
68
}
69