Method

GIRepositoryRepositoryget_c_prefix

since: 2.80

Declaration

const char*
gi_repository_get_c_prefix (
  GIRepository* repository,
  const char* namespace_
)

Description

This function returns the ‘C prefix’, or the C level namespace associated with the given introspection namespace.

Each C symbol starts with this prefix, as well each GType in the library.

Note: The namespace must have already been loaded using a function such as gi_repository_require() before calling this function.

Available since: 2.80

Parameters

namespace_

Type: const char*

Namespace to inspect.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: const char*

C namespace prefix, or NULL if none associated.

The data is owned by the instance.
The return value can be NULL.
The value is a NUL terminated UTF-8 string.