WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
12851
improve gdk's notImplemented() macro
https://bugs.webkit.org/show_bug.cgi?id=12851
Summary
improve gdk's notImplemented() macro
Krzysztof Kowalczyk
Reported
2007-02-21 22:26:59 PST
Improve gdk's notImplemented() macro
Attachments
improve gdk's notImplemented() macro
(60.21 KB, patch)
2007-02-21 22:30 PST
,
Krzysztof Kowalczyk
aroben
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Krzysztof Kowalczyk
Comment 1
2007-02-21 22:30:49 PST
Created
attachment 13309
[details]
improve gdk's notImplemented() macro Improve gdk's notImplemented() macro(): * as suggested per Adam Roben in
http://bugs.webkit.org/show_bug.cgi?id=12785
, only print once per function, so that frequently called functions don't clutter the output * rename to notImplementedGdk() to give it a unique name (so that it doesn't clash with notImplemented() for other platforms) * Don't print the warning if DISABLE_NI_WARNING env variable is set. Is it ok to move notImplementedGdk() to some common place (e.g. config.h) to avoid duplicating the code? If yes, I'll submit a patch for that in the future (I renamed the macro to notImplementedGdk() in anticipation of that).
Adam Roben (:aroben)
Comment 2
2007-02-21 22:41:43 PST
Comment on
attachment 13309
[details]
improve gdk's notImplemented() macro +#define notImplementedGdk() do { \ + static int count; \ + if (!count && !getenv("DISABLE_NI_WARNING")) \ + fprintf(stderr, "FIXME: UNIMPLEMENTED %s %s:%d\n", WTF_PRETTY_FUNCTION, __FILE__, __LINE__); \ + ++count; \ + } while(0) Might as well just use a "bool printed" instead of "int count". Instead of putting this in config.h, you should probably just create your own header platform/gdk/NotImplemented.h that only contains this macro. You might also want to uncomment any other notImplemented() calls that were commented out for being too chatty. r=me.
Krzysztof Kowalczyk
Comment 3
2007-02-21 23:32:19 PST
landed in
r19788
. More improvements coming.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug