Skip to content

HttpClient crash inside {.exportc.} proc #7290

@Mnenmenth

Description

@Mnenmenth

HttpClient causes the program to crash if it is created or accessed inside of a proc with {.exportc.}

C:

extern "C" test();
int main() {
    test()
}

Nim Ex 1:

proc test*() {.exportc.} =
    let client = newHttpClient() <-- crash

Nim Ex 2:

let client = newHttpClient()
proc test*() {.exportc.} =
    client.onProgressChanged = nil <-- crash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions