Commit ce575f06 authored by Christian Hergert's avatar Christian Hergert
Browse files

snippets: use #pragma once for gobject macros

Lets pull people into the future any way we can.
parent d6713eea
...@@ -78,8 +78,7 @@ snippet gobject ...@@ -78,8 +78,7 @@ snippet gobject
} }
- scope chdr - scope chdr
- desc Create GObject header - desc Create GObject header
#ifndef ${$1|functify|upper}_H #pragma once
#define ${$1|functify|upper}_H
#include ${3:<glib-object.h>} #include ${3:<glib-object.h>}
...@@ -97,9 +96,6 @@ snippet gobject ...@@ -97,9 +96,6 @@ snippet gobject
$1 *${$1|functify}_new (void); $1 *${$1|functify}_new (void);
$0 $0
G_END_DECLS G_END_DECLS
#endif /* ${$1|functify|upper}_H */
snippet gobject_final snippet gobject_final
- scope c - scope c
- desc Create final GObject - desc Create final GObject
...@@ -179,8 +175,7 @@ snippet gobject_final ...@@ -179,8 +175,7 @@ snippet gobject_final
} }
- scope chdr - scope chdr
- desc Create final GObject header - desc Create final GObject header
#ifndef ${$1|functify|upper}_H #pragma once
#define ${$1|functify|upper}_H
#include ${3:<glib-object.h>} #include ${3:<glib-object.h>}
...@@ -193,9 +188,6 @@ snippet gobject_final ...@@ -193,9 +188,6 @@ snippet gobject_final
$1 *${$1|functify}_new (void); $1 *${$1|functify}_new (void);
$0 $0
G_END_DECLS G_END_DECLS
#endif /* ${$1|functify|upper}_H */
snippet gobject_boxed_ref snippet gobject_boxed_ref
- scope c - scope c
- desc Create Refed Boxed GObject - desc Create Refed Boxed GObject
...@@ -258,8 +250,7 @@ snippet gobject_boxed_ref ...@@ -258,8 +250,7 @@ snippet gobject_boxed_ref
} }
- scope chdr - scope chdr
- desc Create Refed Boxed GObject header - desc Create Refed Boxed GObject header
#ifndef ${$1|functify|upper}_H #pragma once
#define ${$1|functify|upper}_H
#include ${3:<glib-object.h>} #include ${3:<glib-object.h>}
...@@ -282,9 +273,6 @@ snippet gobject_boxed_ref ...@@ -282,9 +273,6 @@ snippet gobject_boxed_ref
G_DEFINE_AUTOPTR_CLEANUP_FUNC ($1, $4_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC ($1, $4_unref)
$0 $0
G_END_DECLS G_END_DECLS
#endif /* ${$1|functify|upper}_H */
snippet gobject_boxed_copy snippet gobject_boxed_copy
- scope c - scope c
- desc Create copy/free Boxed GObject - desc Create copy/free Boxed GObject
...@@ -323,8 +311,7 @@ snippet gobject_boxed_copy ...@@ -323,8 +311,7 @@ snippet gobject_boxed_copy
} }
- scope chdr - scope chdr
- desc Create copy/free Boxed GObject header - desc Create copy/free Boxed GObject header
#ifndef ${$1|functify|upper}_H #pragma once
#define ${$1|functify|upper}_H
#include ${3:<glib-object.h>} #include ${3:<glib-object.h>}
...@@ -346,13 +333,9 @@ snippet gobject_boxed_copy ...@@ -346,13 +333,9 @@ snippet gobject_boxed_copy
G_DEFINE_AUTOPTR_CLEANUP_FUNC ($1, $4_free) G_DEFINE_AUTOPTR_CLEANUP_FUNC ($1, $4_free)
$0 $0
G_END_DECLS G_END_DECLS
#endif /* ${$1|functify|upper}_H */
snippet gobj_guard snippet gobj_guard
- scope chdr - scope chdr
#ifndef ${1:$filename|stripsuffix|functify|upper}_H #pragma once
#define $1_H
#include <glib.h> #include <glib.h>
...@@ -361,8 +344,6 @@ snippet gobj_guard ...@@ -361,8 +344,6 @@ snippet gobj_guard
$0 $0
G_END_DECLS G_END_DECLS
#endif /* $1_H */
snippet gobj_interface snippet gobj_interface
- scope c - scope c
- desc Create GObject Interface - desc Create GObject Interface
...@@ -376,8 +357,7 @@ snippet gobj_interface ...@@ -376,8 +357,7 @@ snippet gobj_interface
} }
- scope chdr - scope chdr
- desc Create GObject Interface header - desc Create GObject Interface header
#ifndef ${$1|functify|upper}_H #pragma once
#define ${$1|functify|upper}_H
#include ${3:<glib-object.h>} #include ${3:<glib-object.h>}
...@@ -395,8 +375,6 @@ snippet gobj_interface ...@@ -395,8 +375,6 @@ snippet gobj_interface
}; };
G_END_DECLS G_END_DECLS
#endif /* ${$1|functify|upper}_H */
snippet gobj_ref snippet gobj_ref
- scope c - scope c
- desc GObject ref - desc GObject ref
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment