Closed althonos closed 4 years ago
Yeah I'm not merging a patch that rewrites hundreds of lines of whitespace. Not only do I want the whitespace this way, but it also means a lot of irrelevant changes to wade through to review it.
But moving that function to a .cpp is a quite valid request. Also those file* functions should be in #ifdef __cplusplus. I'll just do that myself.
Hi again !
This PR is here to fix an issue I encountered while binding to
libbps
: becausebps_create_delta_inmem
is declared as inline, you cannot link to it asextern "C"
code.However,
bps_create_delta
takesfile*
as arguments, which are C++ classes, therefore you cannot link to it from C code as the C++ ABI is not standard, so you cannot use it from C code.mem
, however, is a properstruct
so it's C compatible.Therefore, by de-inlining
bps_create_delta_inmem
you make it possible to create BPS patches from C code, where is was not feasible before.(also, sorry about the big diff, my code editor removes trailing whitespaces on save).