File: helpers.c

package info (click to toggle)
libgpiod 2.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,172 kB
  • sloc: ansic: 26,661; sh: 8,090; cpp: 4,944; python: 2,426; makefile: 811; xml: 49
file content (12 lines) | stat: -rw-r--r-- 348 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
// SPDX-License-Identifier: GPL-2.0-or-later
// SPDX-FileCopyrightText: 2024 Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

#include "helpers.h"

GArray *gpiodglib_test_array_from_const(gconstpointer data, gsize len,
					gsize elem_size)
{
	GArray *arr = g_array_new(FALSE, TRUE, elem_size);

	return g_array_append_vals(arr, data, len);
}