• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaLang / julia / #37846

22 Jul 2024 01:06AM UTC coverage: 86.908% (+0.8%) from 86.098%
#37846

push

local

web-flow
Preserve Git objects from being garbage collected (#55142)

This issue has been discussed
[here](https://discourse.julialang.org/t/preserve-against-garbage-collection-in-libgit2/117095).

In most cases, thanks to the specialization of `Base.unsafe_convert`, it
is sufficient to replace `obj.ptr` by `obj` in `ccalls` to fix the
issue.

In other cases, for example when a pointer to an internal string is
returned, the code has to be wrapped in `GC.https://github.com/preserve
obj begin ... end` block.

All `LibGit2` tests run successfully. I have left a few `FIXME` comments
where I have doubts about the code, notably with `Ptr{Ptr{Cvoid}}`
arguments.

71 of 73 new or added lines in 15 files covered. (97.26%)

560 existing lines in 28 files now uncovered.

76034 of 87488 relevant lines covered (86.91%)

15443040.18 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.43
/stdlib/Markdown/src/IPython/IPython.jl
1
# This file is a part of Julia. License is MIT: https://julialang.org/license
2

3
mutable struct LaTeX
4
    formula::String
431✔
5
end
6

7
@trigger '$' ->
×
8
function tex(stream::IO, md::MD)
9
    result = parse_inline_wrapper(stream, "\$", rep = true)
21,372✔
10
    return result === nothing ? nothing : LaTeX(result)
21,373✔
11
end
12

13
function blocktex(stream::IO, md::MD)
21,372✔
14
    withstream(stream) do
21,372✔
15
        ex = tex(stream, md)
21,373✔
16
        if ex ≡ nothing
21,372✔
17
            return false
21,371✔
18
        else
19
            push!(md, ex)
1✔
20
            return true
1✔
21
        end
22
    end
23
end
24

UNCOV
25
show(io::IO, tex::LaTeX) =
×
26
    print(io, '$', tex.formula, '$')
27

UNCOV
28
latex(io::IO, tex::LaTeX) =
×
29
    println(io, "\$\$", tex.formula, "\$\$")
30

UNCOV
31
latexinline(io::IO, tex::LaTeX) =
×
32
    print(io, '$', tex.formula, '$')
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc