File: as-version.c

package info (click to toggle)
appstream-glib 0.7.18-1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 6,568 kB
  • sloc: ansic: 38,806; xml: 839; sh: 25; makefile: 24; cpp: 1
file content (38 lines) | stat: -rw-r--r-- 779 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
 *
 * Copyright (C) 2018 Richard Hughes <richard@hughsie.com>
 *
 * SPDX-License-Identifier: LGPL-2.1+
 */

/**
 * SECTION:as-version
 * @short_description: Helpers for the current runtime version.
 * @include: appstream-glib.h
 * @stability: Unstable
 *
 * The version number can be different between build-time and runtime.
 */

#include "config.h"

#include <glib.h>

#include "as-version.h"

/**
 * as_version_string:
 *
 * Gets the libappstream-glib installed runtime version.
 *
 * Returns: a version number, e.g. "0.7.8"
 *
 * Since: 0.7.8
 **/
const gchar *
as_version_string (void)
{
	return G_STRINGIFY(AS_MAJOR_VERSION) "."
		G_STRINGIFY(AS_MINOR_VERSION) "."
		G_STRINGIFY(AS_MICRO_VERSION);
}