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` | 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` | `gssize`
| Length of `buffer1`.
`buffer1_as_path` | `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` | 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` | `gssize`
| Length of `buffer2`.
`buffer2_as_path` | `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` | `GgitDiffOptions`
| A `GgitDiffOptions`, or `NULL`.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`error` | `GError **`
| The return location for a `GError*`, or `NULL`.

#### Return value

Returns: | `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`.