GCC Code Coverage Report


Directory: ./
File: _build/panels/online-accounts/cc-online-accounts-resources.c
Date: 2024-05-03 09:46:52
Exec Total Coverage
Lines: 6 8 75.0%
Functions: 2 3 66.7%
Branches: 0 0 -%

Line Branch Exec Source
1 #include <gio/gio.h>
2
3 #if defined (__ELF__) && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
4 # define SECTION __attribute__ ((section (".gresource.cc_online_accounts"), aligned (sizeof(void *) > 8 ? sizeof(void *) : 8)))
5 #else
6 # define SECTION
7 #endif
8
9 static const SECTION union { const guint8 data[4049]; const double alignment; void * const ptr;} cc_online_accounts_resource_data = {
10 "\107\126\141\162\151\141\156\164\000\000\000\000\000\000\000\000"
11 "\030\000\000\000\034\001\000\000\000\000\000\050\011\000\000\000"
12 "\000\000\000\000\000\000\000\000\001\000\000\000\002\000\000\000"
13 "\003\000\000\000\004\000\000\000\005\000\000\000\005\000\000\000"
14 "\006\000\000\000\113\120\220\013\004\000\000\000\034\001\000\000"
15 "\004\000\114\000\040\001\000\000\044\001\000\000\260\267\044\060"
16 "\000\000\000\000\044\001\000\000\006\000\114\000\054\001\000\000"
17 "\060\001\000\000\316\327\054\215\001\000\000\000\060\001\000\000"
18 "\017\000\114\000\100\001\000\000\104\001\000\000\057\146\361\072"
19 "\002\000\000\000\104\001\000\000\020\000\114\000\124\001\000\000"
20 "\144\001\000\000\324\265\002\000\377\377\377\377\144\001\000\000"
21 "\001\000\114\000\150\001\000\000\154\001\000\000\230\364\060\177"
22 "\003\000\000\000\154\001\000\000\023\000\166\000\200\001\000\000"
23 "\207\002\000\000\262\057\047\164\003\000\000\000\207\002\000\000"
24 "\030\000\166\000\240\002\000\000\160\006\000\000\112\107\220\364"
25 "\003\000\000\000\160\006\000\000\041\000\166\000\230\006\000\000"
26 "\167\010\000\000\375\130\063\011\003\000\000\000\167\010\000\000"
27 "\033\000\166\000\230\010\000\000\320\017\000\000\157\162\147\057"
28 "\001\000\000\000\147\156\157\155\145\057\000\000\002\000\000\000"
29 "\143\157\156\164\162\157\154\055\143\145\156\164\145\162\057\000"
30 "\003\000\000\000\157\156\154\151\156\145\055\141\143\143\157\165"
31 "\156\164\163\057\007\000\000\000\006\000\000\000\010\000\000\000"
32 "\005\000\000\000\057\000\000\000\000\000\000\000\157\156\154\151"
33 "\156\145\055\141\143\143\157\165\156\164\163\056\143\163\163\000"
34 "\367\000\000\000\000\000\000\000\151\155\141\147\145\056\163\171"
35 "\155\142\157\154\151\143\055\143\151\162\143\165\154\141\162\040"
36 "\173\012\040\040\142\141\143\153\147\162\157\165\156\144\055\143"
37 "\157\154\157\162\072\040\141\154\160\150\141\050\143\165\162\162"
38 "\145\156\164\103\157\154\157\162\054\040\060\056\060\070\051\073"
39 "\012\040\040\155\151\156\055\167\151\144\164\150\072\040\063\062"
40 "\160\170\073\012\040\040\155\151\156\055\150\145\151\147\150\164"
41 "\072\040\063\062\160\170\073\012\040\040\142\157\162\144\145\162"
42 "\055\162\141\144\151\165\163\072\040\065\060\045\073\012\175\012"
43 "\012\056\167\141\162\156\151\156\147\055\142\157\170\040\151\155"
44 "\141\147\145\054\012\056\167\141\162\156\151\156\147\055\142\157"
45 "\170\040\154\141\142\145\154\040\173\012\040\040\143\157\154\157"
46 "\162\072\040\100\145\162\162\157\162\137\143\157\154\157\162\073"
47 "\012\175\012\012\056\167\141\162\156\151\156\147\055\142\157\170"
48 "\040\154\141\142\145\154\040\173\012\040\040\146\157\156\164\055"
49 "\167\145\151\147\150\164\072\040\066\060\060\073\012\175\012\000"
50 "\000\050\165\165\141\171\051\143\143\055\157\156\154\151\156\145"
51 "\055\141\143\143\157\165\156\164\055\162\157\167\056\165\151\000"
52 "\300\003\000\000\000\000\000\000\074\077\170\155\154\040\166\145"
53 "\162\163\151\157\156\075\042\061\056\060\042\040\145\156\143\157"
54 "\144\151\156\147\075\042\125\124\106\055\070\042\077\076\012\074"
55 "\151\156\164\145\162\146\141\143\145\076\074\164\145\155\160\154"
56 "\141\164\145\040\143\154\141\163\163\075\042\103\143\117\156\154"
57 "\151\156\145\101\143\143\157\165\156\164\122\157\167\042\040\160"
58 "\141\162\145\156\164\075\042\101\144\167\101\143\164\151\157\156"
59 "\122\157\167\042\076\074\160\162\157\160\145\162\164\171\040\156"
60 "\141\155\145\075\042\141\143\164\151\166\141\164\141\142\154\145"
61 "\042\076\124\162\165\145\074\057\160\162\157\160\145\162\164\171"
62 "\076\074\143\150\151\154\144\040\164\171\160\145\075\042\160\162"
63 "\145\146\151\170\042\076\074\157\142\152\145\143\164\040\143\154"
64 "\141\163\163\075\042\107\164\153\111\155\141\147\145\042\040\151"
65 "\144\075\042\151\143\157\156\137\151\155\141\147\145\042\076\074"
66 "\160\162\157\160\145\162\164\171\040\156\141\155\145\075\042\150"
67 "\141\154\151\147\156\042\076\143\145\156\164\145\162\074\057\160"
68 "\162\157\160\145\162\164\171\076\074\160\162\157\160\145\162\164"
69 "\171\040\156\141\155\145\075\042\166\141\154\151\147\156\042\076"
70 "\143\145\156\164\145\162\074\057\160\162\157\160\145\162\164\171"
71 "\076\074\057\157\142\152\145\143\164\076\074\057\143\150\151\154"
72 "\144\076\074\143\150\151\154\144\040\164\171\160\145\075\042\163"
73 "\165\146\146\151\170\042\076\074\157\142\152\145\143\164\040\143"
74 "\154\141\163\163\075\042\107\164\153\102\157\170\042\040\151\144"
75 "\075\042\167\141\162\156\151\156\147\137\142\157\170\042\076\074"
76 "\160\162\157\160\145\162\164\171\040\156\141\155\145\075\042\157"
77 "\162\151\145\156\164\141\164\151\157\156\042\076\150\157\162\151"
78 "\172\157\156\164\141\154\074\057\160\162\157\160\145\162\164\171"
79 "\076\074\160\162\157\160\145\162\164\171\040\156\141\155\145\075"
80 "\042\163\160\141\143\151\156\147\042\076\066\074\057\160\162\157"
81 "\160\145\162\164\171\076\074\160\162\157\160\145\162\164\171\040"
82 "\156\141\155\145\075\042\155\141\162\147\151\156\055\145\156\144"
83 "\042\076\066\074\057\160\162\157\160\145\162\164\171\076\074\160"
84 "\162\157\160\145\162\164\171\040\156\141\155\145\075\042\166\141"
85 "\154\151\147\156\042\076\143\145\156\164\145\162\074\057\160\162"
86 "\157\160\145\162\164\171\076\074\143\150\151\154\144\076\074\157"
87 "\142\152\145\143\164\040\143\154\141\163\163\075\042\107\164\153"
88 "\111\155\141\147\145\042\076\074\160\162\157\160\145\162\164\171"
89 "\040\156\141\155\145\075\042\151\143\157\156\055\156\141\155\145"
90 "\042\076\144\151\141\154\157\147\055\167\141\162\156\151\156\147"
91 "\055\163\171\155\142\157\154\151\143\074\057\160\162\157\160\145"
92 "\162\164\171\076\074\057\157\142\152\145\143\164\076\074\057\143"
93 "\150\151\154\144\076\074\143\150\151\154\144\076\074\157\142\152"
94 "\145\143\164\040\143\154\141\163\163\075\042\107\164\153\114\141"
95 "\142\145\154\042\076\074\160\162\157\160\145\162\164\171\040\156"
96 "\141\155\145\075\042\154\141\142\145\154\042\040\164\162\141\156"
97 "\163\154\141\164\141\142\154\145\075\042\171\145\163\042\076\105"
98 "\162\162\157\162\074\057\160\162\157\160\145\162\164\171\076\074"
99 "\057\157\142\152\145\143\164\076\074\057\143\150\151\154\144\076"
100 "\074\163\164\171\154\145\076\074\143\154\141\163\163\040\156\141"
101 "\155\145\075\042\167\141\162\156\151\156\147\055\142\157\170\042"
102 "\057\076\074\057\163\164\171\154\145\076\074\057\157\142\152\145"
103 "\143\164\076\074\057\143\150\151\154\144\076\074\143\150\151\154"
104 "\144\040\164\171\160\145\075\042\163\165\146\146\151\170\042\076"
105 "\074\157\142\152\145\143\164\040\143\154\141\163\163\075\042\107"
106 "\164\153\111\155\141\147\145\042\076\074\160\162\157\160\145\162"
107 "\164\171\040\156\141\155\145\075\042\151\143\157\156\055\156\141"
108 "\155\145\042\076\147\157\055\156\145\170\164\055\163\171\155\142"
109 "\157\154\151\143\074\057\160\162\157\160\145\162\164\171\076\074"
110 "\057\157\142\152\145\143\164\076\074\057\143\150\151\154\144\076"
111 "\074\057\164\145\155\160\154\141\164\145\076\074\057\151\156\164"
112 "\145\162\146\141\143\145\076\012\000\000\050\165\165\141\171\051"
113 "\143\143\055\157\156\154\151\156\145\055\141\143\143\157\165\156"
114 "\164\055\160\162\157\166\151\144\145\162\055\162\157\167\056\165"
115 "\151\000\000\000\000\000\000\000\317\001\000\000\000\000\000\000"
116 "\074\077\170\155\154\040\166\145\162\163\151\157\156\075\042\061"
117 "\056\060\042\040\145\156\143\157\144\151\156\147\075\042\125\124"
118 "\106\055\070\042\077\076\012\074\151\156\164\145\162\146\141\143"
119 "\145\076\074\164\145\155\160\154\141\164\145\040\143\154\141\163"
120 "\163\075\042\103\143\117\156\154\151\156\145\101\143\143\157\165"
121 "\156\164\120\162\157\166\151\144\145\162\122\157\167\042\040\160"
122 "\141\162\145\156\164\075\042\101\144\167\101\143\164\151\157\156"
123 "\122\157\167\042\076\074\160\162\157\160\145\162\164\171\040\156"
124 "\141\155\145\075\042\141\143\164\151\166\141\164\141\142\154\145"
125 "\042\076\124\162\165\145\074\057\160\162\157\160\145\162\164\171"
126 "\076\074\143\150\151\154\144\040\164\171\160\145\075\042\160\162"
127 "\145\146\151\170\042\076\074\157\142\152\145\143\164\040\143\154"
128 "\141\163\163\075\042\107\164\153\111\155\141\147\145\042\040\151"
129 "\144\075\042\151\143\157\156\137\151\155\141\147\145\042\076\074"
130 "\160\162\157\160\145\162\164\171\040\156\141\155\145\075\042\150"
131 "\141\154\151\147\156\042\076\143\145\156\164\145\162\074\057\160"
132 "\162\157\160\145\162\164\171\076\074\160\162\157\160\145\162\164"
133 "\171\040\156\141\155\145\075\042\166\141\154\151\147\156\042\076"
134 "\143\145\156\164\145\162\074\057\160\162\157\160\145\162\164\171"
135 "\076\074\057\157\142\152\145\143\164\076\074\057\143\150\151\154"
136 "\144\076\074\143\150\151\154\144\040\164\171\160\145\075\042\163"
137 "\165\146\146\151\170\042\076\074\157\142\152\145\143\164\040\143"
138 "\154\141\163\163\075\042\107\164\153\111\155\141\147\145\042\076"
139 "\074\160\162\157\160\145\162\164\171\040\156\141\155\145\075\042"
140 "\151\143\157\156\055\156\141\155\145\042\076\147\157\055\156\145"
141 "\170\164\055\163\171\155\142\157\154\151\143\074\057\160\162\157"
142 "\160\145\162\164\171\076\074\057\157\142\152\145\143\164\076\074"
143 "\057\143\150\151\154\144\076\074\057\164\145\155\160\154\141\164"
144 "\145\076\074\057\151\156\164\145\162\146\141\143\145\076\012\000"
145 "\000\050\165\165\141\171\051\143\143\055\157\156\154\151\156\145"
146 "\055\141\143\143\157\165\156\164\163\055\160\141\156\145\154\056"
147 "\165\151\000\000\000\000\000\000\050\007\000\000\000\000\000\000"
148 "\074\077\170\155\154\040\166\145\162\163\151\157\156\075\042\061"
149 "\056\060\042\040\145\156\143\157\144\151\156\147\075\042\125\124"
150 "\106\055\070\042\077\076\012\074\151\156\164\145\162\146\141\143"
151 "\145\076\074\164\145\155\160\154\141\164\145\040\143\154\141\163"
152 "\163\075\042\103\143\117\156\154\151\156\145\101\143\143\157\165"
153 "\156\164\163\120\141\156\145\154\042\040\160\141\162\145\156\164"
154 "\075\042\103\143\120\141\156\145\154\042\076\074\160\162\157\160"
155 "\145\162\164\171\040\156\141\155\145\075\042\143\150\151\154\144"
156 "\042\076\074\157\142\152\145\143\164\040\143\154\141\163\163\075"
157 "\042\101\144\167\124\157\157\154\142\141\162\126\151\145\167\042"
158 "\076\074\143\150\151\154\144\040\164\171\160\145\075\042\164\157"
159 "\160\042\076\074\157\142\152\145\143\164\040\143\154\141\163\163"
160 "\075\042\101\144\167\110\145\141\144\145\162\102\141\162\042\057"
161 "\076\074\057\143\150\151\154\144\076\074\160\162\157\160\145\162"
162 "\164\171\040\156\141\155\145\075\042\143\157\156\164\145\156\164"
163 "\042\076\074\157\142\152\145\143\164\040\143\154\141\163\163\075"
164 "\042\107\164\153\102\157\170\042\076\074\160\162\157\160\145\162"
165 "\164\171\040\156\141\155\145\075\042\157\162\151\145\156\164\141"
166 "\164\151\157\156\042\076\166\145\162\164\151\143\141\154\074\057"
167 "\160\162\157\160\145\162\164\171\076\074\143\150\151\154\144\076"
168 "\074\157\142\152\145\143\164\040\143\154\141\163\163\075\042\101"
169 "\144\167\102\141\156\156\145\162\042\040\151\144\075\042\157\146"
170 "\146\154\151\156\145\137\142\141\156\156\145\162\042\076\074\160"
171 "\162\157\160\145\162\164\171\040\156\141\155\145\075\042\164\151"
172 "\164\154\145\042\040\164\162\141\156\163\154\141\164\141\142\154"
173 "\145\075\042\171\145\163\042\076\117\146\146\154\151\156\145\040"
174 "\342\200\224\040\165\156\141\142\154\145\040\164\157\040\143\157"
175 "\156\156\145\143\164\040\141\143\143\157\165\156\164\163\074\057"
176 "\160\162\157\160\145\162\164\171\076\074\057\157\142\152\145\143"
177 "\164\076\074\057\143\150\151\154\144\076\074\143\150\151\154\144"
178 "\076\074\157\142\152\145\143\164\040\143\154\141\163\163\075\042"
179 "\101\144\167\120\162\145\146\145\162\145\156\143\145\163\120\141"
180 "\147\145\042\076\074\160\162\157\160\145\162\164\171\040\156\141"
181 "\155\145\075\042\144\145\163\143\162\151\160\164\151\157\156\042"
182 "\040\164\162\141\156\163\154\141\164\141\142\154\145\075\042\171"
183 "\145\163\042\076\101\154\154\157\167\040\141\160\160\163\040\164"
184 "\157\040\141\143\143\145\163\163\040\157\156\154\151\156\145\040"
185 "\163\145\162\166\151\143\145\163\040\142\171\040\143\157\156\156"
186 "\145\143\164\151\156\147\040\171\157\165\162\040\143\154\157\165"
187 "\144\040\141\143\143\157\165\156\164\163\074\057\160\162\157\160"
188 "\145\162\164\171\076\074\143\150\151\154\144\076\074\157\142\152"
189 "\145\143\164\040\143\154\141\163\163\075\042\101\144\167\120\162"
190 "\145\146\145\162\145\156\143\145\163\107\162\157\165\160\042\040"
191 "\151\144\075\042\141\143\143\157\165\156\164\163\137\146\162\141"
192 "\155\145\042\076\074\160\162\157\160\145\162\164\171\040\156\141"
193 "\155\145\075\042\164\151\164\154\145\042\040\164\162\141\156\163"
194 "\154\141\164\141\142\154\145\075\042\171\145\163\042\076\131\157"
195 "\165\162\040\101\143\143\157\165\156\164\163\074\057\160\162\157"
196 "\160\145\162\164\171\076\074\160\162\157\160\145\162\164\171\040"
197 "\156\141\155\145\075\042\166\151\163\151\142\154\145\042\076\106"
198 "\141\154\163\145\074\057\160\162\157\160\145\162\164\171\076\074"
199 "\143\150\151\154\144\076\074\157\142\152\145\143\164\040\143\154"
200 "\141\163\163\075\042\107\164\153\114\151\163\164\102\157\170\042"
201 "\040\151\144\075\042\141\143\143\157\165\156\164\163\137\154\151"
202 "\163\164\142\157\170\042\076\074\160\162\157\160\145\162\164\171"
203 "\040\156\141\155\145\075\042\150\145\170\160\141\156\144\042\076"
204 "\124\162\165\145\074\057\160\162\157\160\145\162\164\171\076\074"
205 "\160\162\157\160\145\162\164\171\040\156\141\155\145\075\042\163"
206 "\145\154\145\143\164\151\157\156\137\155\157\144\145\042\076\156"
207 "\157\156\145\074\057\160\162\157\160\145\162\164\171\076\074\163"
208 "\151\147\156\141\154\040\156\141\155\145\075\042\162\157\167\055"
209 "\141\143\164\151\166\141\164\145\144\042\040\150\141\156\144\154"
210 "\145\162\075\042\157\156\137\141\143\143\157\165\156\164\163\137"
211 "\154\151\163\164\142\157\170\137\162\157\167\137\141\143\164\151"
212 "\166\141\164\145\144\042\040\157\142\152\145\143\164\075\042\103"
213 "\143\117\156\154\151\156\145\101\143\143\157\165\156\164\163\120"
214 "\141\156\145\154\042\040\163\167\141\160\160\145\144\075\042\171"
215 "\145\163\042\057\076\074\163\164\171\154\145\076\074\143\154\141"
216 "\163\163\040\156\141\155\145\075\042\142\157\170\145\144\055\154"
217 "\151\163\164\042\057\076\074\057\163\164\171\154\145\076\074\141"
218 "\143\143\145\163\163\151\142\151\154\151\164\171\076\074\162\145"
219 "\154\141\164\151\157\156\040\156\141\155\145\075\042\154\141\142"
220 "\145\154\154\145\144\055\142\171\042\076\141\143\143\157\165\156"
221 "\164\163\137\146\162\141\155\145\074\057\162\145\154\141\164\151"
222 "\157\156\076\074\057\141\143\143\145\163\163\151\142\151\154\151"
223 "\164\171\076\074\057\157\142\152\145\143\164\076\074\057\143\150"
224 "\151\154\144\076\074\057\157\142\152\145\143\164\076\074\057\143"
225 "\150\151\154\144\076\074\143\150\151\154\144\076\074\157\142\152"
226 "\145\143\164\040\143\154\141\163\163\075\042\101\144\167\120\162"
227 "\145\146\145\162\145\156\143\145\163\107\162\157\165\160\042\040"
228 "\151\144\075\042\160\162\157\166\151\144\145\162\163\137\147\162"
229 "\157\165\160\042\076\074\160\162\157\160\145\162\164\171\040\156"
230 "\141\155\145\075\042\164\151\164\154\145\042\040\164\162\141\156"
231 "\163\154\141\164\141\142\154\145\075\042\171\145\163\042\076\103"
232 "\157\156\156\145\143\164\040\141\156\040\101\143\143\157\165\156"
233 "\164\074\057\160\162\157\160\145\162\164\171\076\074\143\150\151"
234 "\154\144\076\074\157\142\152\145\143\164\040\143\154\141\163\163"
235 "\075\042\107\164\153\114\151\163\164\102\157\170\042\040\151\144"
236 "\075\042\160\162\157\166\151\144\145\162\163\137\154\151\163\164"
237 "\142\157\170\042\076\074\160\162\157\160\145\162\164\171\040\156"
238 "\141\155\145\075\042\163\145\154\145\143\164\151\157\156\137\155"
239 "\157\144\145\042\076\156\157\156\145\074\057\160\162\157\160\145"
240 "\162\164\171\076\074\141\143\143\145\163\163\151\142\151\154\151"
241 "\164\171\076\074\162\145\154\141\164\151\157\156\040\156\141\155"
242 "\145\075\042\154\141\142\145\154\154\145\144\055\142\171\042\076"
243 "\160\162\157\166\151\144\145\162\163\137\147\162\157\165\160\074"
244 "\057\162\145\154\141\164\151\157\156\076\074\057\141\143\143\145"
245 "\163\163\151\142\151\154\151\164\171\076\074\163\151\147\156\141"
246 "\154\040\156\141\155\145\075\042\162\157\167\055\141\143\164\151"
247 "\166\141\164\145\144\042\040\150\141\156\144\154\145\162\075\042"
248 "\157\156\137\160\162\157\166\151\144\145\162\137\162\157\167\137"
249 "\141\143\164\151\166\141\164\145\144\137\143\142\042\040\157\142"
250 "\152\145\143\164\075\042\103\143\117\156\154\151\156\145\101\143"
251 "\143\157\165\156\164\163\120\141\156\145\154\042\040\163\167\141"
252 "\160\160\145\144\075\042\171\145\163\042\057\076\074\163\164\171"
253 "\154\145\076\074\143\154\141\163\163\040\156\141\155\145\075\042"
254 "\142\157\170\145\144\055\154\151\163\164\042\057\076\074\057\163"
255 "\164\171\154\145\076\074\057\157\142\152\145\143\164\076\074\057"
256 "\143\150\151\154\144\076\074\057\157\142\152\145\143\164\076\074"
257 "\057\143\150\151\154\144\076\074\057\157\142\152\145\143\164\076"
258 "\074\057\143\150\151\154\144\076\074\057\157\142\152\145\143\164"
259 "\076\074\057\160\162\157\160\145\162\164\171\076\074\057\157\142"
260 "\152\145\143\164\076\074\057\160\162\157\160\145\162\164\171\076"
261 "\074\057\164\145\155\160\154\141\164\145\076\074\057\151\156\164"
262 "\145\162\146\141\143\145\076\012\000\000\050\165\165\141\171\051"
263 "" };
264
265 static GStaticResource static_resource = { cc_online_accounts_resource_data.data, sizeof (cc_online_accounts_resource_data.data) - 1 /* nul terminator */, NULL, NULL, NULL };
266
267 G_MODULE_EXPORT
268 GResource *cc_online_accounts_get_resource (void);
269 GResource *cc_online_accounts_get_resource (void)
270 {
271 return g_static_resource_get_resource (&static_resource);
272 }
273 /* GLIB - Library of useful routines for C programming
274 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
275 *
276 * SPDX-License-Identifier: LGPL-2.1-or-later
277 *
278 * This library is free software; you can redistribute it and/or
279 * modify it under the terms of the GNU Lesser General Public
280 * License as published by the Free Software Foundation; either
281 * version 2.1 of the License, or (at your option) any later version.
282 *
283 * This library is distributed in the hope that it will be useful,
284 * but WITHOUT ANY WARRANTY; without even the implied warranty of
285 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
286 * Lesser General Public License for more details.
287 *
288 * You should have received a copy of the GNU Lesser General Public
289 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
290 */
291
292 /*
293 * Modified by the GLib Team and others 1997-2000. See the AUTHORS
294 * file for a list of people on the GLib Team. See the ChangeLog
295 * files for a list of changes. These files are distributed with
296 * GLib at ftp://ftp.gtk.org/pub/gtk/.
297 */
298
299 #ifndef __G_CONSTRUCTOR_H__
300 #define __G_CONSTRUCTOR_H__
301
302 /*
303 If G_HAS_CONSTRUCTORS is true then the compiler support *both* constructors and
304 destructors, in a usable way, including e.g. on library unload. If not you're on
305 your own.
306
307 Some compilers need #pragma to handle this, which does not work with macros,
308 so the way you need to use this is (for constructors):
309
310 #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
311 #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(my_constructor)
312 #endif
313 G_DEFINE_CONSTRUCTOR(my_constructor)
314 static void my_constructor(void) {
315 ...
316 }
317
318 */
319
320 #ifndef __GTK_DOC_IGNORE__
321
322 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
323
324 #define G_HAS_CONSTRUCTORS 1
325
326 #define G_DEFINE_CONSTRUCTOR(_func) static void __attribute__((constructor)) _func (void);
327 #define G_DEFINE_DESTRUCTOR(_func) static void __attribute__((destructor)) _func (void);
328
329 #elif defined (_MSC_VER)
330
331 /*
332 * Only try to include gslist.h if not already included via glib.h,
333 * so that items using gconstructor.h outside of GLib (such as
334 * GResources) continue to build properly.
335 */
336 #ifndef __G_LIB_H__
337 #include "gslist.h"
338 #endif
339
340 #include <stdlib.h>
341
342 #define G_HAS_CONSTRUCTORS 1
343
344 /* We do some weird things to avoid the constructors being optimized
345 * away on VS2015 if WholeProgramOptimization is enabled. First we
346 * make a reference to the array from the wrapper to make sure its
347 * references. Then we use a pragma to make sure the wrapper function
348 * symbol is always included at the link stage. Also, the symbols
349 * need to be extern (but not dllexport), even though they are not
350 * really used from another object file.
351 */
352
353 /* We need to account for differences between the mangling of symbols
354 * for x86 and x64/ARM/ARM64 programs, as symbols on x86 are prefixed
355 * with an underscore but symbols on x64/ARM/ARM64 are not.
356 */
357 #ifdef _M_IX86
358 #define G_MSVC_SYMBOL_PREFIX "_"
359 #else
360 #define G_MSVC_SYMBOL_PREFIX ""
361 #endif
362
363 #define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX)
364 #define G_DEFINE_DESTRUCTOR(_func) G_MSVC_DTOR (_func, G_MSVC_SYMBOL_PREFIX)
365
366 #define G_MSVC_CTOR(_func,_sym_prefix) \
367 static void _func(void); \
368 extern int (* _array ## _func)(void); \
369 int _func ## _wrapper(void); \
370 int _func ## _wrapper(void) { _func(); g_slist_find (NULL, _array ## _func); return 0; } \
371 __pragma(comment(linker,"/include:" _sym_prefix # _func "_wrapper")) \
372 __pragma(section(".CRT$XCU",read)) \
373 __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _wrapper;
374
375 #define G_MSVC_DTOR(_func,_sym_prefix) \
376 static void _func(void); \
377 extern int (* _array ## _func)(void); \
378 int _func ## _constructor(void); \
379 int _func ## _constructor(void) { atexit (_func); g_slist_find (NULL, _array ## _func); return 0; } \
380 __pragma(comment(linker,"/include:" _sym_prefix # _func "_constructor")) \
381 __pragma(section(".CRT$XCU",read)) \
382 __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _constructor;
383
384 #elif defined(__SUNPRO_C)
385
386 /* This is not tested, but i believe it should work, based on:
387 * http://opensource.apple.com/source/OpenSSL098/OpenSSL098-35/src/fips/fips_premain.c
388 */
389
390 #define G_HAS_CONSTRUCTORS 1
391
392 #define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1
393 #define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1
394
395 #define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \
396 init(_func)
397 #define G_DEFINE_CONSTRUCTOR(_func) \
398 static void _func(void);
399
400 #define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \
401 fini(_func)
402 #define G_DEFINE_DESTRUCTOR(_func) \
403 static void _func(void);
404
405 #else
406
407 /* constructors not supported for this compiler */
408
409 #endif
410
411 #endif /* __GTK_DOC_IGNORE__ */
412 #endif /* __G_CONSTRUCTOR_H__ */
413
414 #ifdef G_HAS_CONSTRUCTORS
415
416 #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
417 #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(cc_online_accountsresource_constructor)
418 #endif
419 G_DEFINE_CONSTRUCTOR(cc_online_accountsresource_constructor)
420 #ifdef G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA
421 #pragma G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(cc_online_accountsresource_destructor)
422 #endif
423 G_DEFINE_DESTRUCTOR(cc_online_accountsresource_destructor)
424
425 #else
426 #warning "Constructor not supported on this compiler, linking in resources will not work"
427 #endif
428
429 1 static void cc_online_accountsresource_constructor (void)
430 {
431 1 g_static_resource_init (&static_resource);
432 1 }
433
434 1 static void cc_online_accountsresource_destructor (void)
435 {
436 1 g_static_resource_fini (&static_resource);
437 1 }
438