mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-14 04:54:37 +03:00
Hold only a const version of Settings in Process
This commit is contained in:

committed by
cgzones

parent
7109172431
commit
4eb443926f
@ -165,11 +165,11 @@ ProcessPidColumn Process_pidColumns[] = {
|
||||
{ .id = 0, .label = NULL },
|
||||
};
|
||||
|
||||
OpenBSDProcess* OpenBSDProcess_new(Settings* settings) {
|
||||
Process* OpenBSDProcess_new(const Settings* settings) {
|
||||
OpenBSDProcess* this = xCalloc(sizeof(OpenBSDProcess), 1);
|
||||
Object_setClass(this, Class(OpenBSDProcess));
|
||||
Process_init(&this->super, settings);
|
||||
return this;
|
||||
return &this->this;
|
||||
}
|
||||
|
||||
void Process_delete(Object* cast) {
|
||||
|
@ -27,7 +27,7 @@ extern ProcessFieldData Process_fields[];
|
||||
|
||||
extern ProcessPidColumn Process_pidColumns[];
|
||||
|
||||
OpenBSDProcess* OpenBSDProcess_new(Settings* settings);
|
||||
Process* OpenBSDProcess_new(const Settings* settings);
|
||||
|
||||
void Process_delete(Object* cast);
|
||||
|
||||
|
@ -203,7 +203,7 @@ static inline void OpenBSDProcessList_scanProcs(OpenBSDProcessList* this) {
|
||||
kproc = &kprocs[i];
|
||||
|
||||
preExisting = false;
|
||||
proc = ProcessList_getProcess(&this->super, kproc->p_pid, &preExisting, (Process_New) OpenBSDProcess_new);
|
||||
proc = ProcessList_getProcess(&this->super, kproc->p_pid, &preExisting, OpenBSDProcess_new);
|
||||
fp = (OpenBSDProcess*) proc;
|
||||
|
||||
proc->show = ! ((hideKernelThreads && Process_isKernelThread(proc))
|
||||
|
Reference in New Issue
Block a user