Wouldn’t answer be leaked in that function, or is there some implicit cleanup behavior that the article doesn’t mention?
No, there is no leak, kore_buf_stringify() returns a pointer to the contents of the buffer but its been NUL-terminated to turn it into a C string, it is cleaned up by kore_buf_cleanup().
I’d probably want to indicate it’s const char* then, since char* is usually allocated.
Writing web-facing applications in C is one of those cgi-bin days that went away, and probably for good reason. I’d understand wanting better performance, but perhaps there are better tools.
you’d be surprised
I think BCHS recommends compiling individual executables for each page, and executing them using regular old CGI. Kore is a web framework that generates a shared object file with all your code, that you can then run with “kore run” (or alternatively, generates a single executable)
Tbf, project looks pretty interesting and polished. Especially Python bindings look tempting. I’d love to hear ppl opinions about it.