]> xenbits.xensource.com Git - libvirt.git/commitdiff
docs: hacking: add a conversion table for removed libvirt macros
authorJán Tomko <jtomko@redhat.com>
Wed, 16 Oct 2019 14:11:30 +0000 (16:11 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 17 Oct 2019 10:45:32 +0000 (12:45 +0200)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
docs/hacking.html.in

index 6bae7f5f6459259e0ed9deefdd3726c540fa107b..981b782d31fd03dab23a2172ca09d4b0e354d9f2 100644 (file)
@@ -1066,6 +1066,19 @@ BAD:
         should be used to manage autoclean of virObject classes.
         This matches usage with GObject classes.</dd>
     </dl>
+    <table class="top_table">
+        <tr><th>deleted version</th><th>GLib version</th><th>Notes</th></tr>
+        <tr><td><code>VIR_AUTOPTR</code></td><td><code>g_autoptr</code></td><td></td></tr>
+        <tr><td><code>VIR_AUTOCLEAN</code></td><td><code>g_auto</code></td><td></td></tr>
+        <tr><td><code>VIR_AUTOFREE</code></td><td><code>g_autofree</code></td><td>The GLib version does not use parentheses</td></tr>
+        <tr><td><code>VIR_AUTOUNREF</code></td><td><code>g_autoptr</code></td><td>The cleanup function needs to be defined</td></tr>
+        <tr><td><code>VIR_DEFINE_AUTOPTR_FUNC</code></td><td><code>G_DEFINE_AUTOPTR_CLEANUP_FUNC</code></td><td></td></tr>
+        <tr><td><code>VIR_DEFINE_AUTOCLEAN_FUNC</code></td><td><code>G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC</code></td><td></td></tr>
+        <tr><td><code>VIR_STEAL_PTR</code></td><td><code>g_steal_pointer</code></td>
+            <td><code>a = f(&amp;b)</code> instead of <code>f(a, b)</code></td></tr>
+        <tr><td><code>VIR_RETURN_PTR</code></td><td><code>return g_steal_pointer</code></td><td></td></tr>
+    </table>
+
 
     <h2><a id="file_handling">File handling</a></h2>