]> xenbits.xensource.com Git - libvirt.git/commitdiff
internal: delete VIR_STEAL_PTR
authorJán Tomko <jtomko@redhat.com>
Wed, 16 Oct 2019 11:48:56 +0000 (13:48 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 16 Oct 2019 13:59:42 +0000 (15:59 +0200)
Delete the macro to prevent its usage in new code.

The GLib version should be used instead:
    p = g_steal_pointer(&ptr);

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/internal.h

index 722cdbc57c1b109b293242ab7d42a1d1f579ba6a..fb17b87baac0a1cdace7f234aaddd8895da514f9 100644 (file)
         (a) = (a) ^ (b); \
     } while (0)
 
-/**
- * VIR_STEAL_PTR:
- *
- * Steals pointer passed as second argument into the first argument. Second
- * argument must not have side effects.
- */
-#define VIR_STEAL_PTR(a, b) \
-    do { \
-        (a) = (b); \
-        (b) = NULL; \
-    } while (0)
-
 /**
  * virCheckFlags:
  * @supported: an OR'ed set of supported flags