mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-06 18:52:13 +00:00
style: Specify the possibility of "pragma once" usage
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Snir Sheriber <ssheribe@redhat.com>
This commit is contained in:
parent
2f6e2a8ef9
commit
2379fcd6a5
@ -372,6 +372,15 @@ The macro may include additional information, e.g. a component. For example a fi
|
||||
|
||||
Historically, some headers added underscores liberally, e.g. MY_MODULE_H_. This is neither necessary nor discouraged, although as a reminder, a leading underscore followed by a capital letter is reserved for the implementation and should not be used, so _MY_MODULE_H is, technically speaking, invalid C.
|
||||
|
||||
Alternatively (recommended on newer code) you can use the `pragma once` directive, as:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
#pragma once
|
||||
|
||||
...
|
||||
----
|
||||
|
||||
Header inclusion
|
||||
----------------
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user