GLib.VARIANT_BUILDER_INIT
Description: Reference for GLib.VARIANT_BUILDER_INIT

### Function Macro

# GLibVARIANT_BUILDER_INIT

since: 2.50

#### Declaration [src]

    #define G_VARIANT_BUILDER_INIT (
      variant_type
    )

#### Description [src]

A stack-allocated `GVariantBuilder` must be initialized if it is used together with `g_auto()`. This macro can be used as initializer when declaring the builder, but it cannot be assigned to a variable.

The effects of initializing the builder with `G_VARIANT_BUILDER_INIT` is the same as initializing it with `G_VARIANT_BUILDER_INIT_UNSET()`, followed by a call to `g_variant_builder_init()`.

The passed `variant_type` should be a static `GVariantType` to avoid lifetime issues, as copying the `variant_type` does not happen in the `G_VARIANT_BUILDER_INIT` call, but rather in functions that make sure that `GVariantBuilder` is valid.

      g_auto(GVariantBuilder) builder = G_VARIANT_BUILDER_INIT (G_VARIANT_TYPE_BYTESTRING);

Available since: 2.50

This function is not directly available to language bindings.

#### Parameters

`variant_type`

  Type: `-`

  A const GVariantType*.