Commit a49d154
committed
pybind: Fix C type errors in Cython-generated Python bindings
Several Ceph APIs use bool * types, which correspond to
libcpp.bool * types in Cython. The bint type has an incorrect
size 4 and cannot be used as a replacement.
This prevents a compilation failure with future compilers:
…-build/src/pybind/rbd/rbd.c: In function ‘__pyx_pf_3rbd_3RBD_104namespace_exists’:
…-build/src/pybind/rbd/rbd.c:42165:76: error: passing argument 3 of ‘rbd_namespace_exists’ from incompatible pointer type
42165 | __pyx_v_ret = rbd_namespace_exists(__pyx_v__ioctx, __pyx_v__name, (&__pyx_v__exists));
| ~^~~~~~~~~~~~~~~~~
| |
| int *
In file included from …-build/src/pybind/rbd/rbd.c:1268:
…/src/include/rbd/librbd.h:1496:45: note: expected ‘_Bool *’ but argument is of type ‘int *’
1496 | bool *exists);
| ^
Signed-off-by: Florian Weimer <[email protected]>1 parent f9aea91 commit a49d154
File tree
5 files changed
+24
-11
lines changed- src/pybind
- rbd
- rgw
5 files changed
+24
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
525 | 526 | | |
526 | 527 | | |
527 | 528 | | |
528 | | - | |
| 529 | + | |
529 | 530 | | |
530 | 531 | | |
531 | 532 | | |
| |||
711 | 712 | | |
712 | 713 | | |
713 | 714 | | |
714 | | - | |
| 715 | + | |
715 | 716 | | |
716 | 717 | | |
717 | 718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
| |||
637 | 642 | | |
638 | 643 | | |
639 | 644 | | |
640 | | - | |
| 645 | + | |
641 | 646 | | |
642 | 647 | | |
643 | 648 | | |
| |||
896 | 901 | | |
897 | 902 | | |
898 | 903 | | |
899 | | - | |
| 904 | + | |
900 | 905 | | |
901 | 906 | | |
902 | 907 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
1935 | 1936 | | |
1936 | 1937 | | |
1937 | 1938 | | |
1938 | | - | |
| 1939 | + | |
1939 | 1940 | | |
1940 | 1941 | | |
1941 | 1942 | | |
1942 | 1943 | | |
1943 | | - | |
| 1944 | + | |
1944 | 1945 | | |
1945 | 1946 | | |
1946 | 1947 | | |
| |||
3679 | 3680 | | |
3680 | 3681 | | |
3681 | 3682 | | |
3682 | | - | |
| 3683 | + | |
3683 | 3684 | | |
3684 | 3685 | | |
3685 | 3686 | | |
3686 | 3687 | | |
3687 | | - | |
| 3688 | + | |
3688 | 3689 | | |
3689 | 3690 | | |
3690 | 3691 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
3 | 8 | | |
4 | 9 | | |
5 | 10 | | |
| |||
111 | 116 | | |
112 | 117 | | |
113 | 118 | | |
114 | | - | |
115 | | - | |
| 119 | + | |
| 120 | + | |
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
373 | 374 | | |
374 | 375 | | |
375 | 376 | | |
376 | | - | |
| 377 | + | |
377 | 378 | | |
378 | 379 | | |
379 | 380 | | |
| |||
0 commit comments