[webkit-dev] Proposal: Use #pragma once instead of header guards

Michael Catanzaro mcatanzaro at igalia.com
Wed Mar 9 18:46:42 PST 2016


On Wed, 2016-03-09 at 17:27 -0800, Anders Carlsson wrote:
> Hi floks,
> 
> Currently we use 
> 
> #ifndef Header_h
> #define Header_h
> 
> … 
> 
> #endif
> 
> I propose that we instead start using
> 
> #pragma once
> 
> which does the same thing.

I think it's fine for the GTK port in general, but it would be nice to
keep this out of our public headers. That is mostly just GTK-specific
headers, but also the public JavaScriptCore headers JavaScript.h,
JSBase.h, JSContextRef.h, JSObjectRef.h, JSStringRef.h, JSValueRef.h,
and WebKitAvailability.h.

Michael


More information about the webkit-dev mailing list