On 6/19/24 03:22, Philippe Mathieu-Daudé wrote:
On 19/6/24 00:45, Roman Kiryanov wrote:
to use the QEMU headers with a C++ compiler.

Google-Bug-Id: 331190993
Change-Id: Ic4e49b9c791616bb22c973922772b0494706092c
Signed-off-by: Roman Kiryanov <r...@google.com>
---
  include/exec/memory.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/exec/memory.h b/include/exec/memory.h
index 1be58f694c..d7591a60d9 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -945,7 +945,7 @@ struct MemoryListener {
       * the current transaction.
       */
      void (*log_start)(MemoryListener *listener, MemoryRegionSection *section,
-                      int old, int new);
+                      int old_val, int new_val);
      /**
       * @log_stop:
@@ -964,7 +964,7 @@ struct MemoryListener {
       * the current transaction.
       */
      void (*log_stop)(MemoryListener *listener, MemoryRegionSection *section,
-                     int old, int new);
+                     int old_val, int new_val);

OK but please keep the implementations in sync with the prototype
argument names:

accel/hvf/hvf-accel-ops.c:264: MemoryRegionSection *section, int old, int new)
accel/hvf/hvf-accel-ops.c:274: MemoryRegionSection *section, int old, int new)
accel/kvm/kvm-all.c:549:                          int old, int new)
accel/kvm/kvm-all.c:566:                          int old, int new)
hw/i386/xen/xen-hvm.c:430:                          int old, int new)
hw/i386/xen/xen-hvm.c:441:                         int old, int new)
hw/virtio/vhost.c:1070:                            int old, int new)
hw/virtio/vhost.c:1077:                           int old, int new)
include/exec/memory.h:948:                      int old, int new);
include/exec/memory.h:967:                     int old, int new);

See also:
target/arm/tcg/translate-a64.c:2161:        int new = a->imm * 3;

We're not trying to purge "new" from the entire tree, only (some) header files.


r~

Reply via email to