bt2/native_bt_wrap.c: In function ‘bt_py3_component_class_query’:
bt2/native_bt_wrap.c:4453:12: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
*result = (void *) PyLong_AsUnsignedLongLong(py_results_addr);
^
bt2/native_bt_wrap.c: In function ‘bt_py3_component_class_message_iterator_next’:
bt2/native_bt_wrap.c:4697:3: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
(const bt_message *) PyLong_AsUnsignedLongLong(
^
python-plugin-provider.c: In function ‘bt_plugin_from_python_plugin_info’:
python-plugin-provider.c:341:18: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
comp_class = (bt_component_class *)
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I44d15e5d072d993776539eddae5f3e37c6161cac
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1162
CI-Build: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
* (PyLong) containing the address of a BT value object (new
* reference).
*/
- *result = (void *) PyLong_AsUnsignedLongLong(py_results_addr);
+ *result = PyLong_AsVoidPtr(py_results_addr);
BT_ASSERT(!PyErr_Occurred());
BT_ASSERT(*result);
goto end;
* (PyLong) containing the address of a native message
* object (which is now ours).
*/
- msgs[0] =
- (const bt_message *) PyLong_AsUnsignedLongLong(
- py_method_result);
+ msgs[0] = PyLong_AsVoidPtr(py_method_result);
*count = 1;
/* Clear potential overflow error; should never happen */
PyList_GetItem(py_comp_class_addrs, i);
BT_ASSERT(py_comp_class_addr);
if (PyLong_Check(py_comp_class_addr)) {
- comp_class = (bt_component_class *)
- PyLong_AsUnsignedLongLong(py_comp_class_addr);
+ comp_class = PyLong_AsVoidPtr(py_comp_class_addr);
} else {
BT_LOGW("Component class address is not an integer in Python plugin info object: "
"py-plugin-info-addr=%p, index=%zu",