# # patch "ChangeLog" # from [2f78a91f47b6623c4f799e972dee6802456a63d6] # to [a009ebf1f12ffe6cb933f545de3b601d91b1c898] # # patch "monotone.cc" # from [83c2a6eceac13acc995892416718e307bbc22644] # to [2c609ebf9134ede471612285518f342751451434] # --- ChangeLog +++ ChangeLog @@ -1,5 +1,11 @@ 2005-03-23 Nathaniel Smith + * monotone.cc (my_poptFreeContext, cpp_main): Apparently + poptFreeContext silently changed its return type at some unknown + time. Hack around this. + +2005-03-23 Nathaniel Smith + * monotone.cc (cpp_main): Remove the special code to dump before printing exception information, since we no longer dump to the screen, so it's always better to have the little status message --- monotone.cc +++ monotone.cc @@ -138,6 +138,17 @@ } }; +// Stupid type system tricks: to use a cleanup_ptr, we need to know the return +// type of the cleanup function. But popt silently changed the return type of +// poptFreeContext at some point, I guess because they thought it would be +// "backwards compatible". We don't actually _use_ the return value of +// poptFreeContext, so this little wrapper works. +static void +my_poptFreeContext(poptContext con) +{ + poptFreeContext(con); +} + int cpp_main(int argc, char ** argv) { @@ -175,9 +186,9 @@ // prepare for arg parsing - cleanup_ptr + cleanup_ptr ctx(poptGetContext(NULL, argc, (char const **) uv.argv, options, 0), - &poptFreeContext); + &my_poptFreeContext); // process main program options