From 228f12224855b8f71cba2b6961f9f889609a1606 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Mon, 26 Feb 2018 15:42:25 -0500 Subject: [PATCH] qapi: rename *qmp-*-visitor* to *qobject-*-visitor* The QMP visitors have no direct dependency on QMP. It is valid to use them anywhere that one has a QObject. Rename them to better reflect their functionality as a generic QObject to QAPI converter. This is the first of three parts: rename the files. The next two parts will rename C identifiers. The split is necessary to make git rename detection work. Backports commit b3db211f3c80bb996a704d665fe275619f728bd4 from qemu --- msvc/unicorn/unicorn/unicorn.vcxproj | 8 ++++---- msvc/unicorn/unicorn/unicorn.vcxproj.filters | 8 ++++---- msvc/unicorn/unicorn_static/unicorn_static.vcxproj | 8 ++++---- .../unicorn/unicorn_static/unicorn_static.vcxproj.filters | 8 ++++---- .../qapi/{qmp-input-visitor.h => qobject-input-visitor.h} | 0 .../{qmp-output-visitor.h => qobject-output-visitor.h} | 0 qemu/qapi/Makefile.objs | 4 ++-- qemu/qapi/qapi-clone-visitor.c | 2 +- .../qapi/{qmp-input-visitor.c => qobject-input-visitor.c} | 2 +- .../{qmp-output-visitor.c => qobject-output-visitor.c} | 2 +- qemu/qom/qom-qobject.c | 4 ++-- qemu/scripts/qapi-event.py | 2 +- 12 files changed, 24 insertions(+), 24 deletions(-) rename qemu/include/qapi/{qmp-input-visitor.h => qobject-input-visitor.h} (100%) rename qemu/include/qapi/{qmp-output-visitor.h => qobject-output-visitor.h} (100%) rename qemu/qapi/{qmp-input-visitor.c => qobject-input-visitor.c} (99%) rename qemu/qapi/{qmp-output-visitor.c => qobject-output-visitor.c} (99%) diff --git a/msvc/unicorn/unicorn/unicorn.vcxproj b/msvc/unicorn/unicorn/unicorn.vcxproj index 4e32f3dd..0c877d77 100644 --- a/msvc/unicorn/unicorn/unicorn.vcxproj +++ b/msvc/unicorn/unicorn/unicorn.vcxproj @@ -201,8 +201,8 @@ copy $(SolutionDir)..\include\unicorn\*.h $(SolutionDir)distro\include\unicorn\ - - + + @@ -316,8 +316,8 @@ copy $(SolutionDir)..\include\unicorn\*.h $(SolutionDir)distro\include\unicorn\ - - + + diff --git a/msvc/unicorn/unicorn/unicorn.vcxproj.filters b/msvc/unicorn/unicorn/unicorn.vcxproj.filters index a0da23fa..f9f5fca3 100644 --- a/msvc/unicorn/unicorn/unicorn.vcxproj.filters +++ b/msvc/unicorn/unicorn/unicorn.vcxproj.filters @@ -77,10 +77,10 @@ qemu\qapi - + qemu\qapi - + qemu\qapi @@ -382,10 +382,10 @@ qemu\include\qapi - + qemu\include\qapi - + qemu\include\qapi diff --git a/msvc/unicorn/unicorn_static/unicorn_static.vcxproj b/msvc/unicorn/unicorn_static/unicorn_static.vcxproj index b3f80110..d67a2cda 100644 --- a/msvc/unicorn/unicorn_static/unicorn_static.vcxproj +++ b/msvc/unicorn/unicorn_static/unicorn_static.vcxproj @@ -29,8 +29,8 @@ - - + + @@ -130,8 +130,8 @@ - - + + diff --git a/msvc/unicorn/unicorn_static/unicorn_static.vcxproj.filters b/msvc/unicorn/unicorn_static/unicorn_static.vcxproj.filters index e6a4a1d3..c983c143 100644 --- a/msvc/unicorn/unicorn_static/unicorn_static.vcxproj.filters +++ b/msvc/unicorn/unicorn_static/unicorn_static.vcxproj.filters @@ -105,10 +105,10 @@ qemu\qapi - + qemu\qapi - + qemu\qapi @@ -372,10 +372,10 @@ qemu\include\qapi - + qemu\include\qapi - + qemu\include\qapi diff --git a/qemu/include/qapi/qmp-input-visitor.h b/qemu/include/qapi/qobject-input-visitor.h similarity index 100% rename from qemu/include/qapi/qmp-input-visitor.h rename to qemu/include/qapi/qobject-input-visitor.h diff --git a/qemu/include/qapi/qmp-output-visitor.h b/qemu/include/qapi/qobject-output-visitor.h similarity index 100% rename from qemu/include/qapi/qmp-output-visitor.h rename to qemu/include/qapi/qobject-output-visitor.h diff --git a/qemu/qapi/Makefile.objs b/qemu/qapi/Makefile.objs index d2462fa6..7afc3869 100644 --- a/qemu/qapi/Makefile.objs +++ b/qemu/qapi/Makefile.objs @@ -1,4 +1,4 @@ -util-obj-y = qapi-visit-core.o qapi-dealloc-visitor.o qmp-input-visitor.o +util-obj-y = qapi-visit-core.o qapi-dealloc-visitor.o qobject-input-visitor.o util-obj-y += qapi-clone-visitor.o -util-obj-y += qmp-output-visitor.o +util-obj-y += qobject-output-visitor.o util-obj-y += string-input-visitor.o diff --git a/qemu/qapi/qapi-clone-visitor.c b/qemu/qapi/qapi-clone-visitor.c index 0bb82163..34086cbf 100644 --- a/qemu/qapi/qapi-clone-visitor.c +++ b/qemu/qapi/qapi-clone-visitor.c @@ -110,7 +110,7 @@ static void qapi_clone_type_str(Visitor *v, const char *name, char **obj, assert(qcv->depth); /* * Pointer was already cloned by g_memdup; create fresh copy. - * Note that as long as qmp-output-visitor accepts NULL instead of + * Note that as long as qobject-output-visitor accepts NULL instead of * "", then we must do likewise. However, we want to obey the * input visitor semantics of never producing NULL when the empty * string is intended. diff --git a/qemu/qapi/qmp-input-visitor.c b/qemu/qapi/qobject-input-visitor.c similarity index 99% rename from qemu/qapi/qmp-input-visitor.c rename to qemu/qapi/qobject-input-visitor.c index 0e012c1b..a1bb4a17 100644 --- a/qemu/qapi/qmp-input-visitor.c +++ b/qemu/qapi/qobject-input-visitor.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "qapi/qmp-input-visitor.h" +#include "qapi/qobject-input-visitor.h" #include "qapi/visitor-impl.h" #include "qemu/queue.h" #include "qemu-common.h" diff --git a/qemu/qapi/qmp-output-visitor.c b/qemu/qapi/qobject-output-visitor.c similarity index 99% rename from qemu/qapi/qmp-output-visitor.c rename to qemu/qapi/qobject-output-visitor.c index 25bc43a4..d374375e 100644 --- a/qemu/qapi/qmp-output-visitor.c +++ b/qemu/qapi/qobject-output-visitor.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "qapi/qmp-output-visitor.h" +#include "qapi/qobject-output-visitor.h" #include "qapi/visitor-impl.h" #include "qemu/queue.h" #include "qemu-common.h" diff --git a/qemu/qom/qom-qobject.c b/qemu/qom/qom-qobject.c index 4297d4c2..0b8e9cf3 100644 --- a/qemu/qom/qom-qobject.c +++ b/qemu/qom/qom-qobject.c @@ -15,8 +15,8 @@ #include "qom/object.h" #include "qom/qom-qobject.h" #include "qapi/visitor.h" -#include "qapi/qmp-input-visitor.h" -#include "qapi/qmp-output-visitor.h" +#include "qapi/qobject-input-visitor.h" +#include "qapi/qobject-output-visitor.h" void object_property_set_qobject(struct uc_struct *uc, Object *obj, QObject *value, const char *name, Error **errp) diff --git a/qemu/scripts/qapi-event.py b/qemu/scripts/qapi-event.py index 30e64584..525dcdc7 100644 --- a/qemu/scripts/qapi-event.py +++ b/qemu/scripts/qapi-event.py @@ -206,7 +206,7 @@ fdef.write(mcgen(''' #include "qemu-common.h" #include "%(prefix)sqapi-event.h" #include "%(prefix)sqapi-visit.h" -#include "qapi/qmp-output-visitor.h" +#include "qapi/qobject-output-visitor.h" #include "qapi/qmp-event.h" ''',