tidwall / neco

Concurrency library for C (coroutines)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

In example 4, "arg2" undeclared in the neco_main

RiverOnVenus opened this issue · comments

Hello, I'm trying each of the examples and found a small mistake in example 4.

    int *arg1 = malloc(sizeof(int));
    *arg1 = 1;

    neco_start(coroutine, 5, &arg0, arg1, &(int){2}, NULL, "hello world");
    free(arg2);

free(arg2) should be free(arg1).

Regards

Fixed. Thanks for reporting!