Rename Glib primitive types to standard C types
Some checks failed
Test / build (push) Failing after 16s

This commit is contained in:
2026-02-27 09:51:29 +01:00
parent 5875f6ac9a
commit 2c65a2c6b0
19 changed files with 563 additions and 566 deletions

View File

@@ -1,27 +1,33 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#include <cstdint>
#include "pk-backend.h"
#include <pk-backend-job.h>
gpointer
void *
pk_backend_job_get_user_data (PkBackendJob *job)
{
return NULL;
return nullptr;
}
void
pk_backend_job_set_user_data (PkBackendJob *job, gpointer user_data)
pk_backend_job_set_user_data (PkBackendJob *job, void *user_data)
{
}
void
pk_backend_job_set_allow_cancel (PkBackendJob *job, gboolean allow_cancel)
pk_backend_job_set_allow_cancel (PkBackendJob *job, bool allow_cancel)
{
}
void
pk_backend_job_package (PkBackendJob *job,
PkInfoEnum info,
const gchar *package_id,
const gchar *summary)
const char *package_id,
const char *summary)
{
}
@@ -31,62 +37,62 @@ pk_backend_job_set_status (PkBackendJob *job, PkStatusEnum status)
}
void
pk_backend_job_set_percentage (PkBackendJob *job, guint percentage)
pk_backend_job_set_percentage (PkBackendJob *job, unsigned percentage)
{
}
void
pk_backend_job_error_code (PkBackendJob *job,
PkErrorEnum error_code, const gchar *format, ...)
PkErrorEnum error_code, const char *format, ...)
{
}
void
pk_backend_job_files (PkBackendJob *job,
const gchar *package_id, gchar **files)
const char *package_id, char **files)
{
}
void
pk_backend_job_details (PkBackendJob *job,
const gchar *package_id,
const gchar *summary,
const gchar *license,
const char *package_id,
const char *summary,
const char *license,
PkGroupEnum group,
const gchar *description,
const gchar *url,
gulong size,
guint64 download_size)
const char *description,
const char *url,
unsigned long size,
std::uint64_t download_size)
{
}
void
pk_backend_job_update_detail (PkBackendJob *job,
const gchar *package_id,
gchar **updates,
gchar **obsoletes,
gchar **vendor_urls,
gchar **bugzilla_urls,
gchar **cve_urls,
const char *package_id,
char **updates,
char **obsoletes,
char **vendor_urls,
char **bugzilla_urls,
char **cve_urls,
PkRestartEnum restart,
const gchar *update_text,
const gchar *changelog,
const char *update_text,
const char *changelog,
PkUpdateStateEnum state,
const gchar *issued,
const gchar *updated)
const char *issued,
const char *updated)
{
}
gboolean
bool
pk_backend_job_thread_create (PkBackendJob *job,
PkBackendJobThreadFunc func,
gpointer user_data,
void *user_data,
GDestroyNotify destroy_func)
{
return FALSE;
return false;
}
gboolean pk_directory_remove_contents (const gchar *directory)
bool pk_directory_remove_contents (const char *directory)
{
return TRUE;
return true;
}

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#include "dl.h"
using namespace slack;
@@ -5,7 +10,7 @@ using namespace slack;
static void
slack_test_dl_construct()
{
auto dl = new Dl ("some", "mirror", 1, NULL, NULL);
auto dl = new Dl ("some", "mirror", 1, nullptr, nullptr);
g_assert_cmpstr (dl->get_name (), ==, "some");
g_assert_cmpstr (dl->get_mirror (), ==, "mirror");
@@ -17,7 +22,7 @@ slack_test_dl_construct()
int main(int argc, char *argv[])
{
g_test_init(&argc, &argv, NULL);
g_test_init(&argc, &argv, nullptr);
g_test_add_func("/slack/dl/construct", slack_test_dl_construct);

View File

@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#include "slackpkg.h"
using namespace slack;
@@ -5,7 +10,7 @@ using namespace slack;
static void
slack_test_slackpkg_construct()
{
auto slackpkg = new Slackpkg ("some", "mirror", 1, NULL, NULL);
auto slackpkg = new Slackpkg ("some", "mirror", 1, nullptr, nullptr);
g_assert_cmpstr(slackpkg->get_name (), ==, "some");
g_assert_cmpstr(slackpkg->get_mirror (), ==, "mirror");
@@ -17,7 +22,7 @@ slack_test_slackpkg_construct()
int main(int argc, char *argv[])
{
g_test_init(&argc, &argv, NULL);
g_test_init(&argc, &argv, nullptr);
g_test_add_func("/slack/slackpkg/construct", slack_test_slackpkg_construct);