El sáb, 05-07-2008 a las 17:30 -0400, Pavel Roskin escribió: > They probably should be functions. We may want to sparse annotate GRUB > one day, and then inline functions in the only way to go. Hmm... you mean changing this
#define grub_swap_bytes16(x) \ ({ \ grub_uint16_t _x = (x); \ (grub_uint16_t) ((_x << 8) | (_x >> 8)); \ }) ...for this inline grub_uint16_t grub_swap_bytes16(uint16_t x) { return (x << 8) | (x >> 8); } and such? The pro is that we get rid of the ugly hack in the macro version that ensures single evaluation, but a con is that we cannot _force_ any random compiler to inline anything, so we might end up with gross numbers of function calls. By the way, what is "sparse annotate"?
signature.asc
Description: Esta parte del mensaje está firmada digitalmente
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel