# # # patch "sanity.hh" # from [5d3ced86455ffad98885fa705c0f3f8c2bcd3227] # to [e4a9495b8a3e2f7b715ee409cdc3727af161597f] # ============================================================ --- sanity.hh 5d3ced86455ffad98885fa705c0f3f8c2bcd3227 +++ sanity.hh e4a9495b8a3e2f7b715ee409cdc3727af161597f @@ -345,12 +345,17 @@ struct bad_decode { // I is for invariants that "should" always be true // (if they are wrong, there is a *bug*) + +#define FILE_LINE_INNER(line) __FILE__ ":" #line +#define FILE_LINE_MIDDLE(line) FILE_LINE_INNER(line) +#define FILE_LINE FILE_LINE_MIDDLE(__LINE__) + #define I(e) \ do { \ if (UNLIKELY(!(e))) \ { \ global_sanity.generic_failure("I("#e")", origin::internal, \ - F("%s") % "I("#e")", \ + F("%s") % FILE_LINE": I("#e")", \ __FILE__, __LINE__); \ } \ } while (0)