pty: change callback parameters to "const xy"
There is no reason to allow the callbacks to modify our internal data so make it constant. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
1 parent
2ddd47e858
commit
885bdef87b
2 files changed
+3
-2
No files matched your search
@@ -48,7 +48,7 @@
|
||||
struct kmscon_pty;
|
||||
|
||||
typedef void (*kmscon_pty_input_cb)
|
||||
(struct kmscon_pty *pty, char *u8, size_t len, void *data);
|
||||
(struct kmscon_pty *pty, const char *u8, size_t len, void *data);
|
||||
|
||||
int kmscon_pty_new(struct kmscon_pty **out, struct kmscon_eloop *loop,
|
||||
kmscon_pty_input_cb input_cb, void *data);
|
||||
|
||||
+2
-1
@@ -106,7 +106,8 @@ static void schedule_redraw(struct kmscon_terminal *term)
|
||||
log_warn("terminal: cannot schedule redraw\n");
|
||||
}
|
||||
|
||||
static void pty_input(struct kmscon_pty *pty, char *u8, size_t len, void *data)
|
||||
static void pty_input(struct kmscon_pty *pty, const char *u8, size_t len,
|
||||
void *data)
|
||||
{
|
||||
size_t i;
|
||||
struct kmscon_terminal *term = data;
|
||||
|
||||
Reference in new issue
Block a user