This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/6846] Full featured printf hooks


------- Additional Comments From drepper at redhat dot com  2009-04-10 03:25 -------
There are two severe design flaws I found so far:

1. There should be no fixed size be associated with a modifier.  With your code
a modifier identifies a specific format.  That's not how modifiers work. 
Instead, the size is only known by the combination of modifier and specifier.

2. Related: imagine what happens with your implementation if more than one place
inserts printf hooks and specifically for new modifiers.  The user bits use
define are up for grabs by everybody.  What instead should happen is that you
register a modifier (arbitrary length, BTW) and then get a bitmask back with one
bit set.  This you'll have to store and interpret appropriately when the
callbacks for the specifier is called.


I have to see where this leaves us.  I'll look at writing this code myself now,
so no need to revise your code.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6846

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]