summary refs log tree commit diff stats
path: root/docs/devel/qapi-code-gen.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/devel/qapi-code-gen.txt')
-rw-r--r--docs/devel/qapi-code-gen.txt12
1 files changed, 3 insertions, 9 deletions
diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/qapi-code-gen.txt
index 43bd853e69..87183d3a09 100644
--- a/docs/devel/qapi-code-gen.txt
+++ b/docs/devel/qapi-code-gen.txt
@@ -1369,8 +1369,8 @@ Example:
     void qapi_event_send_my_event(void);
 
     typedef enum example_QAPIEvent {
-        EXAMPLE_QAPI_EVENT_MY_EVENT = 0,
-        EXAMPLE_QAPI_EVENT__MAX = 1,
+        EXAMPLE_QAPI_EVENT_MY_EVENT,
+        EXAMPLE_QAPI_EVENT__MAX,
     } example_QAPIEvent;
 
     #define example_QAPIEvent_str(val) \
@@ -1385,16 +1385,10 @@ Example:
     void qapi_event_send_my_event(void)
     {
         QDict *qmp;
-        QMPEventFuncEmit emit;
-
-        emit = qmp_event_get_func_emit();
-        if (!emit) {
-            return;
-        }
 
         qmp = qmp_event_build_dict("MY_EVENT");
 
-        emit(EXAMPLE_QAPI_EVENT_MY_EVENT, qmp);
+        example_qapi_event_emit(EXAMPLE_QAPI_EVENT_MY_EVENT, qmp);
 
         qobject_unref(qmp);
     }