Commit 72f3ce1d authored by Sebastian Ramacher's avatar Sebastian Ramacher
Browse files

Rename private to priv

Avoid to name variables after a C++ keyword.
parent 36065d3b
Pipeline #480 passed with stages
in 2 minutes and 9 seconds
......@@ -10,7 +10,7 @@
#include <girara/utils.h>
typedef struct private_s {
typedef struct {
char* file_path;
} ZathuraFileMonitorPrivate;
......@@ -24,11 +24,11 @@ enum {
static void
finalize(GObject* object)
{
ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(object);
ZathuraFileMonitorPrivate* private = zathura_filemonitor_get_instance_private(file_monitor);
ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(object);
ZathuraFileMonitorPrivate* priv = zathura_filemonitor_get_instance_private(file_monitor);
if (private->file_path != NULL) {
g_free(private->file_path);
if (priv->file_path != NULL) {
g_free(priv->file_path);
}
G_OBJECT_CLASS(zathura_filemonitor_parent_class)->finalize(object);
......@@ -37,15 +37,15 @@ finalize(GObject* object)
static void
set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
{
ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(object);
ZathuraFileMonitorPrivate* private = zathura_filemonitor_get_instance_private(file_monitor);
ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(object);
ZathuraFileMonitorPrivate* priv = zathura_filemonitor_get_instance_private(file_monitor);
switch (prop_id) {
case PROP_FILE_PATH:
if (private->file_path != NULL) {
g_free(private->file_path);
if (priv->file_path != NULL) {
g_free(priv->file_path);
}
private->file_path = g_value_dup_string(value);
priv->file_path = g_value_dup_string(value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
......@@ -55,12 +55,12 @@ set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* ps
static void
get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
{
ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(object);
ZathuraFileMonitorPrivate* private = zathura_filemonitor_get_instance_private(file_monitor);
ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(object);
ZathuraFileMonitorPrivate* priv = zathura_filemonitor_get_instance_private(file_monitor);
switch (prop_id) {
case PROP_FILE_PATH:
g_value_set_string(value, private->file_path);
g_value_set_string(value, priv->file_path);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
......@@ -94,14 +94,14 @@ zathura_filemonitor_class_init(ZathuraFileMonitorClass* class)
static void
zathura_filemonitor_init(ZathuraFileMonitor* file_monitor)
{
ZathuraFileMonitorPrivate* private = zathura_filemonitor_get_instance_private(file_monitor);
private->file_path = NULL;
ZathuraFileMonitorPrivate* priv = zathura_filemonitor_get_instance_private(file_monitor);
priv->file_path = NULL;
}
const char* zathura_filemonitor_get_filepath(ZathuraFileMonitor* file_monitor)
{
ZathuraFileMonitorPrivate* private = zathura_filemonitor_get_instance_private(file_monitor);
return private->file_path;
ZathuraFileMonitorPrivate* priv = zathura_filemonitor_get_instance_private(file_monitor);
return priv->file_path;
}
void zathura_filemonitor_start(ZathuraFileMonitor* file_monitor)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment