Commit b44d565
committed
New export_to_dbus algorithm using metadata
Instead of iterating over all members to find D-Bus elements
use the `_dbus_iter_interfaces_meta` to iterate over the metadata
and then `getattr` the exact Python attributes containing the
D-Bus elements.
This makes the algorithm faster as it won't have to go through
all members as well as allows for D-Bus interfaces without any
members to be exported.
Raise an error if no interfaces got exported to prevent unexpected
errors except for ObjectManager where libsystemd allow exporting
without any extra interfaces.1 parent 4dac6ca commit b44d565
File tree
4 files changed
+36
-36
lines changed- src/sdbus
- test
4 files changed
+36
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | | - | |
56 | 54 | | |
57 | 55 | | |
58 | 56 | | |
| |||
312 | 310 | | |
313 | 311 | | |
314 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
319 | 320 | | |
320 | | - | |
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | 337 | | |
364 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
365 | 341 | | |
366 | | - | |
367 | 342 | | |
368 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
369 | 348 | | |
370 | 349 | | |
371 | 350 | | |
| |||
404 | 383 | | |
405 | 384 | | |
406 | 385 | | |
407 | | - | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
408 | 389 | | |
409 | | - | |
410 | | - | |
| 390 | + | |
411 | 391 | | |
412 | 392 | | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
413 | 396 | | |
414 | 397 | | |
415 | 398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1017 | 1017 | | |
1018 | 1018 | | |
1019 | 1019 | | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
0 commit comments