mirror of https://github.com/xzeldon/htop.git
Mark remaining classes const
This commit is contained in:
parent
5cc20e7cb2
commit
7af06659e2
|
@ -67,7 +67,7 @@ static void MaskItem_display(const Object* cast, RichString* out) {
|
|||
RichString_append(out, CRT_colors[CHECK_TEXT], this->text);
|
||||
}
|
||||
|
||||
static ObjectClass MaskItem_class = {
|
||||
static const ObjectClass MaskItem_class = {
|
||||
.display = MaskItem_display,
|
||||
.delete = MaskItem_delete
|
||||
};
|
||||
|
|
|
@ -16,7 +16,7 @@ in the source distribution for its full text.
|
|||
#include <mach/mach.h>
|
||||
|
||||
|
||||
ProcessClass DarwinProcess_class = {
|
||||
const ProcessClass DarwinProcess_class = {
|
||||
.super = {
|
||||
.extends = Class(Process),
|
||||
.display = Process_display,
|
||||
|
|
|
@ -20,7 +20,7 @@ typedef struct DarwinProcess_ {
|
|||
bool taskAccess;
|
||||
} DarwinProcess;
|
||||
|
||||
extern ProcessClass DarwinProcess_class;
|
||||
extern const ProcessClass DarwinProcess_class;
|
||||
|
||||
DarwinProcess* DarwinProcess_new(Settings* settings);
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ in the source distribution for its full text.
|
|||
#include <sys/syscall.h>
|
||||
|
||||
|
||||
ProcessClass DragonFlyBSDProcess_class = {
|
||||
const ProcessClass DragonFlyBSDProcess_class = {
|
||||
.super = {
|
||||
.extends = Class(Process),
|
||||
.display = Process_display,
|
||||
|
|
|
@ -27,7 +27,7 @@ typedef struct DragonFlyBSDProcess_ {
|
|||
//#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
||||
#define Process_isUserlandThread(_process) (_process->nlwp > 1)
|
||||
|
||||
extern ProcessClass DragonFlyBSDProcess_class;
|
||||
extern const ProcessClass DragonFlyBSDProcess_class;
|
||||
|
||||
extern ProcessFieldData Process_fields[];
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ in the source distribution for its full text.
|
|||
#include <sys/syscall.h>
|
||||
|
||||
|
||||
ProcessClass FreeBSDProcess_class = {
|
||||
const ProcessClass FreeBSDProcess_class = {
|
||||
.super = {
|
||||
.extends = Class(Process),
|
||||
.display = Process_display,
|
||||
|
|
|
@ -25,7 +25,7 @@ typedef struct FreeBSDProcess_ {
|
|||
|
||||
#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
||||
|
||||
extern ProcessClass FreeBSDProcess_class;
|
||||
extern const ProcessClass FreeBSDProcess_class;
|
||||
|
||||
extern ProcessFieldData Process_fields[];
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ ProcessPidColumn Process_pidColumns[] = {
|
|||
{ .id = 0, .label = NULL },
|
||||
};
|
||||
|
||||
ProcessClass LinuxProcess_class = {
|
||||
const ProcessClass LinuxProcess_class = {
|
||||
.super = {
|
||||
.extends = Class(Process),
|
||||
.display = Process_display,
|
||||
|
|
|
@ -157,7 +157,7 @@ extern ProcessFieldData Process_fields[];
|
|||
|
||||
extern ProcessPidColumn Process_pidColumns[];
|
||||
|
||||
extern ProcessClass LinuxProcess_class;
|
||||
extern const ProcessClass LinuxProcess_class;
|
||||
|
||||
LinuxProcess* LinuxProcess_new(Settings* settings);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ in the source distribution for its full text.
|
|||
#include "Meter.h"
|
||||
}*/
|
||||
|
||||
static int PressureStallMeter_attributes[] = {
|
||||
static const int PressureStallMeter_attributes[] = {
|
||||
PRESSURE_STALL_TEN, PRESSURE_STALL_SIXTY, PRESSURE_STALL_THREEHUNDRED
|
||||
};
|
||||
|
||||
|
@ -52,7 +52,7 @@ static void PressureStallMeter_display(const Object* cast, RichString* out) {
|
|||
RichString_append(out, CRT_colors[PRESSURE_STALL_THREEHUNDRED], buffer);
|
||||
}
|
||||
|
||||
MeterClass PressureStallCPUSomeMeter_class = {
|
||||
const MeterClass PressureStallCPUSomeMeter_class = {
|
||||
.super = {
|
||||
.extends = Class(Meter),
|
||||
.delete = Meter_delete,
|
||||
|
@ -68,7 +68,7 @@ MeterClass PressureStallCPUSomeMeter_class = {
|
|||
.caption = "Some CPU pressure: "
|
||||
};
|
||||
|
||||
MeterClass PressureStallIOSomeMeter_class = {
|
||||
const MeterClass PressureStallIOSomeMeter_class = {
|
||||
.super = {
|
||||
.extends = Class(Meter),
|
||||
.delete = Meter_delete,
|
||||
|
@ -84,7 +84,7 @@ MeterClass PressureStallIOSomeMeter_class = {
|
|||
.caption = "Some IO pressure: "
|
||||
};
|
||||
|
||||
MeterClass PressureStallIOFullMeter_class = {
|
||||
const MeterClass PressureStallIOFullMeter_class = {
|
||||
.super = {
|
||||
.extends = Class(Meter),
|
||||
.delete = Meter_delete,
|
||||
|
@ -100,7 +100,7 @@ MeterClass PressureStallIOFullMeter_class = {
|
|||
.caption = "Full IO pressure: "
|
||||
};
|
||||
|
||||
MeterClass PressureStallMemorySomeMeter_class = {
|
||||
const MeterClass PressureStallMemorySomeMeter_class = {
|
||||
.super = {
|
||||
.extends = Class(Meter),
|
||||
.delete = Meter_delete,
|
||||
|
@ -116,7 +116,7 @@ MeterClass PressureStallMemorySomeMeter_class = {
|
|||
.caption = "Some Mem pressure: "
|
||||
};
|
||||
|
||||
MeterClass PressureStallMemoryFullMeter_class = {
|
||||
const MeterClass PressureStallMemoryFullMeter_class = {
|
||||
.super = {
|
||||
.extends = Class(Meter),
|
||||
.delete = Meter_delete,
|
||||
|
|
|
@ -12,14 +12,14 @@ in the source distribution for its full text.
|
|||
|
||||
#include "Meter.h"
|
||||
|
||||
extern MeterClass PressureStallCPUSomeMeter_class;
|
||||
extern const MeterClass PressureStallCPUSomeMeter_class;
|
||||
|
||||
extern MeterClass PressureStallIOSomeMeter_class;
|
||||
extern const MeterClass PressureStallIOSomeMeter_class;
|
||||
|
||||
extern MeterClass PressureStallIOFullMeter_class;
|
||||
extern const MeterClass PressureStallIOFullMeter_class;
|
||||
|
||||
extern MeterClass PressureStallMemorySomeMeter_class;
|
||||
extern const MeterClass PressureStallMemorySomeMeter_class;
|
||||
|
||||
extern MeterClass PressureStallMemoryFullMeter_class;
|
||||
extern const MeterClass PressureStallMemoryFullMeter_class;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -17,7 +17,7 @@ in the source distribution for its full text.
|
|||
#include <sys/syscall.h>
|
||||
|
||||
|
||||
ProcessClass OpenBSDProcess_class = {
|
||||
const ProcessClass OpenBSDProcess_class = {
|
||||
.super = {
|
||||
.extends = Class(Process),
|
||||
.display = Process_display,
|
||||
|
|
|
@ -21,7 +21,7 @@ typedef struct OpenBSDProcess_ {
|
|||
|
||||
#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
||||
|
||||
extern ProcessClass OpenBSDProcess_class;
|
||||
extern const ProcessClass OpenBSDProcess_class;
|
||||
|
||||
extern ProcessFieldData Process_fields[];
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ in the source distribution for its full text.
|
|||
#include <sys/syscall.h>
|
||||
|
||||
|
||||
ProcessClass SolarisProcess_class = {
|
||||
const ProcessClass SolarisProcess_class = {
|
||||
.super = {
|
||||
.extends = Class(Process),
|
||||
.display = Process_display,
|
||||
|
|
|
@ -44,7 +44,7 @@ typedef struct SolarisProcess_ {
|
|||
|
||||
#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
|
||||
|
||||
extern ProcessClass SolarisProcess_class;
|
||||
extern const ProcessClass SolarisProcess_class;
|
||||
|
||||
extern ProcessFieldData Process_fields[];
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ in the source distribution for its full text.
|
|||
#include "Meter.h"
|
||||
}*/
|
||||
|
||||
int ZfsArcMeter_attributes[] = {
|
||||
static const int ZfsArcMeter_attributes[] = {
|
||||
ZFS_MFU, ZFS_MRU, ZFS_ANON, ZFS_HEADER, ZFS_OTHER
|
||||
};
|
||||
|
||||
|
@ -86,7 +86,7 @@ static void ZfsArcMeter_display(const Object* cast, RichString* out) {
|
|||
}
|
||||
}
|
||||
|
||||
MeterClass ZfsArcMeter_class = {
|
||||
const MeterClass ZfsArcMeter_class = {
|
||||
.super = {
|
||||
.extends = Class(Meter),
|
||||
.delete = Meter_delete,
|
||||
|
|
|
@ -11,10 +11,8 @@ in the source distribution for its full text.
|
|||
|
||||
#include "Meter.h"
|
||||
|
||||
extern int ZfsArcMeter_attributes[];
|
||||
|
||||
void ZfsArcMeter_readStats(Meter* this, ZfsArcStats* stats);
|
||||
|
||||
extern MeterClass ZfsArcMeter_class;
|
||||
extern const MeterClass ZfsArcMeter_class;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,7 +23,7 @@ in the source distribution for its full text.
|
|||
#include "Meter.h"
|
||||
}*/
|
||||
|
||||
int ZfsCompressedArcMeter_attributes[] = {
|
||||
static const int ZfsCompressedArcMeter_attributes[] = {
|
||||
ZFS_COMPRESSED
|
||||
};
|
||||
|
||||
|
@ -68,7 +68,7 @@ static void ZfsCompressedArcMeter_display(const Object* cast, RichString* out) {
|
|||
}
|
||||
}
|
||||
|
||||
MeterClass ZfsCompressedArcMeter_class = {
|
||||
const MeterClass ZfsCompressedArcMeter_class = {
|
||||
.super = {
|
||||
.extends = Class(Meter),
|
||||
.delete = Meter_delete,
|
||||
|
|
|
@ -11,10 +11,8 @@ in the source distribution for its full text.
|
|||
|
||||
#include "Meter.h"
|
||||
|
||||
extern int ZfsCompressedArcMeter_attributes[];
|
||||
|
||||
void ZfsCompressedArcMeter_readStats(Meter* this, ZfsArcStats* stats);
|
||||
|
||||
extern MeterClass ZfsCompressedArcMeter_class;
|
||||
extern const MeterClass ZfsCompressedArcMeter_class;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue