Ggit.Diff.new_buffers
Description: Reference for Ggit.Diff.new_buffers

### Constructor

# Ggit Diffnew_buffers

#### Declaration [src]

    GgitDiff*
    ggit_diff_new_buffers (
      const guint8* buffer1,
      gssize buffer1_len,
      const gchar* buffer1_as_path,
      const guint8* buffer2,
      gssize buffer2_len,
      const gchar* buffer2_as_path,
      GgitDiffOptions* diff_options,
      GError** error
    )

#### Description [src]

Same as `ggit_diff_blobs()` but using a buffers. Creates a `GgitDiff` which compares `buffer1` and `buffer2`.

If `diff_options` is `NULL` then the defaults specified in `ggit_diff_options_new()` are used.

#### Parameters

`buffer1`

  Type: An array of `guint8`

  A buffer to diff from.

  The argument can be `NULL`.
  The length of the array is specified in the `buffer1_len` argument.
  The data is owned by the caller of the function.

`buffer1_len`

  Type: `gssize`

  Length of `buffer1`.

`buffer1_as_path`

  Type: `const gchar*`

  Treat `buffer1` as if it had this filename, or `NULL`,

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`buffer2`

  Type: An array of `guint8`

  A buffer to diff to.

  The argument can be `NULL`.
  The length of the array is specified in the `buffer2_len` argument.
  The data is owned by the caller of the function.

`buffer2_len`

  Type: `gssize`

  Length of `buffer2`.

`buffer2_as_path`

  Type: `const gchar*`

  Treat `buffer2` as if it had this filename, or `NULL`,

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`diff_options`

  Type: `GgitDiffOptions`

  A `GgitDiffOptions`, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will left initialized to `NULL` by the constructor if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `GgitDiff`

A newly allocated `GgitDiff` if there was no error, `NULL` otherwise.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.