forked from external/yambar
module: begin_expose() and content() take a non-const module pointer
This commit is contained in:
parent
b579f97db7
commit
7f0f096ba4
9 changed files with 15 additions and 15 deletions
|
@ -49,11 +49,11 @@ destroy(struct module *mod)
|
|||
}
|
||||
|
||||
static struct exposable *
|
||||
content(const struct module *mod)
|
||||
content(struct module *mod)
|
||||
{
|
||||
const struct private *m = mod->private;
|
||||
|
||||
mtx_lock(&((struct module *)mod)->lock);
|
||||
mtx_lock(&mod->lock);
|
||||
|
||||
assert(m->state == STATE_FULL ||
|
||||
m->state == STATE_CHARGING ||
|
||||
|
@ -92,7 +92,7 @@ content(const struct module *mod)
|
|||
.count = 6,
|
||||
};
|
||||
|
||||
mtx_unlock(&((struct module *)mod)->lock);
|
||||
mtx_unlock(&mod->lock);
|
||||
|
||||
struct exposable *exposable = m->label->instantiate(m->label, &tags);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ destroy(struct module *mod)
|
|||
}
|
||||
|
||||
static struct exposable *
|
||||
content(const struct module *mod)
|
||||
content(struct module *mod)
|
||||
{
|
||||
const struct private *m = mod->private;
|
||||
time_t t = time(NULL);
|
||||
|
|
|
@ -397,7 +397,7 @@ destroy(struct module *mod)
|
|||
}
|
||||
|
||||
static struct exposable *
|
||||
content(const struct module *mod)
|
||||
content(struct module *mod)
|
||||
{
|
||||
struct private *m = mod->private;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ destroy(struct module *mod)
|
|||
}
|
||||
|
||||
static struct exposable *
|
||||
content(const struct module *mod)
|
||||
content(struct module *mod)
|
||||
{
|
||||
const struct private *m = mod->private;
|
||||
return m->label->instantiate(m->label, NULL);
|
||||
|
|
|
@ -52,7 +52,7 @@ destroy(struct module *mod)
|
|||
}
|
||||
|
||||
static struct exposable *
|
||||
content(const struct module *mod)
|
||||
content(struct module *mod)
|
||||
{
|
||||
const struct private *m = mod->private;
|
||||
|
||||
|
|
|
@ -255,7 +255,7 @@ run(struct module_run_context *ctx)
|
|||
}
|
||||
|
||||
static struct exposable *
|
||||
content(const struct module *mod)
|
||||
content(struct module *mod)
|
||||
{
|
||||
struct private *m = mod->private;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue