@@ -126,12 +126,43 @@
Loading
126 126
    buf.writenl();
127 127
    buf.writestringln("#pragma once");
128 128
    buf.writenl();
129 -
//    buf.writestring("#include <assert.h>\n");
129 +
    hashInclude(buf, "<assert.h>");
130 130
    hashInclude(buf, "<stddef.h>");
131 131
    hashInclude(buf, "<stdint.h>");
132 132
//    buf.writestring(buf, "#include <stdio.h>\n");
133 133
//    buf.writestring("#include <string.h>\n");
134 -
    buf.writenl();
134 +
135 +
    // Emit array compatibility because extern(C++) types may have slices
136 +
    // as members (as opposed to function parameters)
137 +
    buf.writestring(`
138 +
#ifdef CUSTOM_D_ARRAY_TYPE
139 +
#define _d_dynamicArray CUSTOM_D_ARRAY_TYPE
140 +
#else
141 +
/// Represents a D [] array
142 +
template<typename T>
143 +
struct _d_dynamicArray
144 +
{
145 +
    size_t length;
146 +
    T *ptr;
147 +
148 +
    _d_dynamicArray() : length(0), ptr(NULL) { }
149 +
150 +
    _d_dynamicArray(size_t length_in, T *ptr_in)
151 +
        : length(length_in), ptr(ptr_in) { }
152 +
153 +
    T& operator[](const size_t idx) {
154 +
        assert(idx < length);
155 +
        return ptr[idx];
156 +
    }
157 +
158 +
    const T& operator[](const size_t idx) const {
159 +
        assert(idx < length);
160 +
        return ptr[idx];
161 +
    }
162 +
};
163 +
#endif
164 +
`);
165 +
135 166
    if (v.hasReal)
136 167
    {
137 168
        hashIf(buf, "!defined(_d_real)");
@@ -1568,7 +1599,7 @@
Loading
1568 1599
        }
1569 1600
        if (!cdparent && t.isConst())
1570 1601
            buf.writestring("const ");
1571 -
        buf.writestring("DArray< ");
1602 +
        buf.writestring("_d_dynamicArray< ");
1572 1603
        t.next.accept(this);
1573 1604
        buf.writestring(" >");
1574 1605
    }
Files Coverage
src/dmd 78.046%
Project Totals (204 files) 78.046%
1
# Documentation: https://docs.codecov.io/docs/codecov-yaml
2
# Validate with: `curl --data-binary @.codecov.yml https://codecov.io/validate`
3

4
codecov:
5
  notify:
6
    # We don't want to wait for the CodeCov report
7
    # See https://github.com/codecov/support/issues/312
8
    require_ci_to_pass: false
9
    after_n_builds: 1  # send notifications after the first upload
10
    wait_for_ci: false
11

12
  bot: dlang-bot
13
  ci:
14
    # https://docs.codecov.io/docs/detecting-ci-services
15
    # Only CircleCi generates coverages files atm.
16
    # Don't wait for the other CIs
17
    - circleci.com
18
    - !dtest.dlang.io
19
    - !auto-tester.puremagic.com
20
    - !appveyor.com
21
    - !ci.dlang.io
22
    - !travis-ci.org
23

24
  # At CircleCi, the PR is merged into `master` before the testsuite is run.
25
  # This allows CodeCov to adjust the resulting coverage diff, s.t. it matches
26
  # with the GitHub diff.
27
  # https://github.com/codecov/support/issues/363
28
  # https://docs.codecov.io/v4.3.6/docs/comparing-commits
29
  allow_coverage_offsets: true
30

31
coverage:
32
  precision: 3
33
  round: down
34
  range: "80...100"
35

36
  # Learn more at https://docs.codecov.io/docs/commit-status
37
  status:
38
    project: off
39
    patch:
40
      default:
41
        informational: true
42
    changes: off
43

44
  # https://docs.codecov.io/docs/fixing-paths
45
  fixes:
46
    - "test/.*/::src/"
47
    - "fail_compilation/::src/"
48

49
comment: false
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading