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
@ -79,11 +79,11 @@ ProcessPidColumn Process_pidColumns[] = {
|
||||
{ .id = 0, .label = NULL },
|
||||
};
|
||||
|
||||
SolarisProcess* SolarisProcess_new(Settings* settings) {
|
||||
Process* SolarisProcess_new(const Settings* settings) {
|
||||
SolarisProcess* this = xCalloc(1, sizeof(SolarisProcess));
|
||||
Object_setClass(this, Class(SolarisProcess));
|
||||
Process_init(&this->super, settings);
|
||||
return this;
|
||||
return &this->super;
|
||||
}
|
||||
|
||||
void Process_delete(Object* cast) {
|
||||
|
@ -50,7 +50,7 @@ extern ProcessFieldData Process_fields[];
|
||||
|
||||
extern ProcessPidColumn Process_pidColumns[];
|
||||
|
||||
SolarisProcess* SolarisProcess_new(Settings* settings);
|
||||
Process* SolarisProcess_new(const Settings* settings);
|
||||
|
||||
void Process_delete(Object* cast);
|
||||
|
||||
|
@ -279,7 +279,7 @@ int SolarisProcessList_walkproc(psinfo_t *_psinfo, lwpsinfo_t *_lwpsinfo, void *
|
||||
} else {
|
||||
getpid = lwpid;
|
||||
}
|
||||
Process *proc = ProcessList_getProcess(pl, getpid, &preExisting, (Process_New) SolarisProcess_new);
|
||||
Process *proc = ProcessList_getProcess(pl, getpid, &preExisting, SolarisProcess_new);
|
||||
SolarisProcess *sproc = (SolarisProcess*) proc;
|
||||
|
||||
// Common code pass 1
|
||||
|
Reference in New Issue
Block a user