projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac5d32b
)
Apply clang-tidy fixes for bugprone-macro-parentheses in Interop.h (NFC)
author
Mehdi Amini
<joker.eph@gmail.com>
Tue, 11 Jan 2022 20:21:37 +0000
(20:21 +0000)
committer
Mehdi Amini
<joker.eph@gmail.com>
Wed, 12 Jan 2022 20:21:47 +0000
(20:21 +0000)
mlir/include/mlir-c/Bindings/Python/Interop.h
patch
|
blob
|
history
diff --git
a/mlir/include/mlir-c/Bindings/Python/Interop.h
b/mlir/include/mlir-c/Bindings/Python/Interop.h
index
7fcfd02
..
7efe850
100644
(file)
--- a/
mlir/include/mlir-c/Bindings/Python/Interop.h
+++ b/
mlir/include/mlir-c/Bindings/Python/Interop.h
@@
-96,7
+96,8
@@
/// Gets a void* from a wrapped struct. Needed because const cast is different
/// between C/C++.
#ifdef __cplusplus
-#define MLIR_PYTHON_GET_WRAPPED_POINTER(object) const_cast<void *>(object.ptr)
+#define MLIR_PYTHON_GET_WRAPPED_POINTER(object) \
+ (const_cast<void *>((object).ptr))
#else
#define MLIR_PYTHON_GET_WRAPPED_POINTER(object) (void *)(object.ptr)
#endif