Move QObjects to their own directory
PATCH 1/1 Move QObjects to their own directory
Signed-off-by Luiz Capitulino <[email protected]>
--- Makefile | 15 ++- check-qdict.c | 6 +- check-qint.c | 2 +- check-qstring.c | 2 +- console.h | 2 +- migration.h | 2 +- monitor.c | 6 +- monitor.h | 2 +- net.h | 2 +- objects/qdict.c | 297 +++++++++++++++++++++++++++++++++++++++++++++++++++++ objects/qdict.h | 42 ++++++++ objects/qint.c | 66 ++++++++++++ objects/qint.h | 16 +++ objects/qobject.h | 109 +++++++++++++++++++ objects/qstring.c | 73 +++++++++++++ objects/qstring.h | 15 +++ qdict.c | 297 ----------------------------------------------------- qdict.h | 42 -------- qint.c | 66 ------------ qint.h | 16 --- qobject.h | 109 ------------------- qstring.c | 73 ------------- qstring.h | 15 --- sysemu.h | 2 +- 24 files changed, 641 insertions(+), 636 deletions(-) create mode 100644 objects/qdict.c create mode 100644 objects/qdict.h create mode 100644 objects/qint.c create mode 100644 objects/qint.h create mode 100644 objects/qobject.h create mode 100644 objects/qstring.c create mode 100644 objects/qstring.h delete mode 100644 qdict.c delete mode 100644 qdict.h delete mode 100644 qint.c delete mode 100644 qint.h delete mode 100644 qobject.h delete mode 100644 qstring.c delete mode 100644 qstring.h
Makefile +10 -5
@@ -95,7 +95,7 @@ obj-y += buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o obj-y += qemu-char.o aio.o net-checksum.o savevm.o obj-y += msmouse.o ps2.o obj-y += qdev.o qdev-properties.o ssi.o -obj-y += qint.o qstring.o qdict.o qemu-config.o +obj-y += qemu-config.o obj-$(CONFIG_BRLAPI) += baum.o obj-$(CONFIG_WIN32) += tap-win32.o
@@ -125,6 +125,9 @@ obj-$(CONFIG_VNC_SASL) += vnc-auth-sasl.o obj-$(CONFIG_COCOA) += cocoa.o obj-$(CONFIG_IOTHREAD) += qemu-thread.o +objects-obj-y = qint.o qstring.o qdict.o +obj-y += $(addprefix objects/, $(objects-obj-y)) + slirp-obj-y = cksum.o if.o ip_icmp.o ip_input.o ip_output.o slirp-obj-y += slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o slirp-obj-y += tcp_subr.o tcp_timer.o udp.o bootp.o tftp.o
@@ -179,15 +182,17 @@ qemu-io$(EXESUF): qemu-io.o qemu-tool.o cmd.o $(block-obj-y) qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $@") -check-qint: check-qint.o qint.o qemu-malloc.o -check-qstring: check-qstring.o qstring.o qemu-malloc.o -check-qdict: check-qdict.o qdict.o qint.o qstring.o qemu-malloc.o +check-qint: check-qint.o objects/qint.o qemu-malloc.o +check-qstring: check-qstring.o objects/qstring.o qemu-malloc.o +check-qdict: check-qdict.o objects/qdict.o objects/qint.o \ + objects/qstring.o qemu-malloc.o clean: # avoid old build problems by removing potentially incorrect old files rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~ rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d + rm -f objects/*.o objects/*.d rm -f qemu-img-cmds.h $(MAKE) -C tests clean for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser; do \
@@ -370,4 +375,4 @@ tarbin: $(mandir)/man8/qemu-nbd.8 # Include automatically generated dependency files --include $(wildcard *.d audio/*.d slirp/*.d block/*.d) +-include $(wildcard *.d audio/*.d slirp/*.d block/*.d objects/*.d)
check-qdict.c +3 -3
@@ -8,9 +8,9 @@*/ #include <check.h> -#include "qint.h" -#include "qdict.h" -#include "qstring.h" +#include "objects/qint.h" +#include "objects/qdict.h" +#include "objects/qstring.h" #include "qemu-common.h" /*
check-qint.c +1 -1
@@ -8,7 +8,7 @@*/ #include <check.h> -#include "qint.h" +#include "objects/qint.h" #include "qemu-common.h" /*
check-qstring.c +1 -1
@@ -8,7 +8,7 @@*/ #include <check.h> -#include "qstring.h" +#include "objects/qstring.h" #include "qemu-common.h" /*
console.h +1 -1
@@ -2,7 +2,7 @@#define CONSOLE_H #include "qemu-char.h" -#include "qdict.h" +#include "objects/qdict.h" /* keyboard/mouse support */
migration.h +1 -1
@@ -14,7 +14,7 @@#ifndef QEMU_MIGRATION_H #define QEMU_MIGRATION_H -#include "qdict.h" +#include "objects/qdict.h" #include "qemu-common.h" #define MIG_STATE_ERROR -1
monitor.c +3 -3
@@ -44,9 +44,9 @@#include "migration.h" #include "kvm.h" #include "acl.h" -#include "qint.h" -#include "qdict.h" -#include "qstring.h" +#include "objects/qint.h" +#include "objects/qdict.h" +#include "objects/qstring.h" //#define DEBUG //#define DEBUG_COMPLETION
monitor.h +1 -1
@@ -3,7 +3,7 @@#include "qemu-common.h" #include "qemu-char.h" -#include "qdict.h" +#include "objects/qdict.h" #include "block.h" extern Monitor *cur_mon;
net.h +1 -1
@@ -3,7 +3,7 @@#include "qemu-queue.h" #include "qemu-common.h" -#include "qdict.h" +#include "objects/qdict.h" /* VLANs support */
objects/qdict.c new file +297 -0
297 lines not on this page · raw message
objects/qdict.h new file +42 -0
42 lines not on this page · raw message
objects/qint.c new file +66 -0
66 lines not on this page · raw message
objects/qint.h new file +16 -0
@@ -0,0 +1,16 @@ +#ifndef QINT_H +#define QINT_H + +#include <stdint.h> +#include "objects/qobject.h" + +typedef struct QInt { +QObject_HEAD ; +int64_t value; +}QInt ; + +QInt *qint_from_int (int64_t value); +int64_t qint_get_int (const QInt *qi); +QInt *qobject_to_qint (const QObject *obj); + +#endif /* QINT_H */
objects/qobject.h new file +109 -0
109 lines not on this page · raw message
objects/qstring.c new file +73 -0
73 lines not on this page · raw message
objects/qstring.h new file +15 -0
@@ -0,0 +1,15 @@ +#ifndef QSTRING_H +#define QSTRING_H + +#include "objects/qobject.h" + +typedef struct QString { +QObject_HEAD ; +char *string; +}QString ; + +QString *qstring_from_str (const char *str); +const char *qstring_get_str (const QString *qstring); +QString *qobject_to_qstring (const QObject *obj); + +#endif /* QSTRING_H */
qdict.c deleted +0 -297
297 lines not on this page · raw message
qdict.h deleted +0 -42
42 lines not on this page · raw message
qint.c deleted +0 -66
66 lines not on this page · raw message
qint.h deleted +0 -16
@@ -1,16 +0,0 @@ -#ifndef QINT_H -#define QINT_H - -#include <stdint.h> -#include "qobject.h" - -typedef struct QInt { -QObject_HEAD ; -int64_t value; -}QInt ; - -QInt *qint_from_int (int64_t value); -int64_t qint_get_int (const QInt *qi); -QInt *qobject_to_qint (const QObject *obj); - -#endif /* QINT_H */
qobject.h deleted +0 -109
109 lines not on this page · raw message
qstring.c deleted +0 -73
73 lines not on this page · raw message
qstring.h deleted +0 -15
@@ -1,15 +0,0 @@ -#ifndef QSTRING_H -#define QSTRING_H - -#include "qobject.h" - -typedef struct QString { -QObject_HEAD ; -char *string; -}QString ; - -QString *qstring_from_str (const char *str); -const char *qstring_get_str (const QString *qstring); -QString *qobject_to_qstring (const QObject *obj); - -#endif /* QSTRING_H */
sysemu.h +1 -1
@@ -5,7 +5,7 @@#include "qemu-common.h" #include "qemu-option.h" #include "qemu-queue.h" -#include "qdict.h" +#include "objects/qdict.h" #ifdef _WIN32#include <windows.h>
Signature · 1 line
1.6.5.rc2