diff --git a/c_src/sqlite3_drv.c b/c_src/sqlite3_drv.c index c24fb9e..fa29b41 100644 --- a/c_src/sqlite3_drv.c +++ b/c_src/sqlite3_drv.c @@ -148,9 +148,9 @@ static void stop(ErlDrvData handle) { } // Handle input from Erlang VM -static int control( +static ErlDrvSSizeT control( ErlDrvData drv_data, unsigned int command, char *buf, - int len, char **rbuf, int rlen) { + ErlDrvSizeT len, char **rbuf, ErlDrvSizeT rlen) { sqlite3_drv_t* driver_data = (sqlite3_drv_t*) drv_data; switch (command) { case CMD_SQL_EXEC: diff --git a/c_src/sqlite3_drv.h b/c_src/sqlite3_drv.h index 01ddeb4..f5c0f04 100644 --- a/c_src/sqlite3_drv.h +++ b/c_src/sqlite3_drv.h @@ -97,8 +97,8 @@ typedef struct async_sqlite3_command { static ErlDrvData start(ErlDrvPort port, char* cmd); static void stop(ErlDrvData handle); -static int control(ErlDrvData drv_data, unsigned int command, char *buf, - int len, char **rbuf, int rlen); +static ErlDrvSSizeT control(ErlDrvData drv_data, unsigned int command, char *buf, + ErlDrvSizeT len, char **rbuf, ErlDrvSizeT rlen); static int sql_exec(sqlite3_drv_t *drv, char *buf, int len); static int sql_bind_and_exec(sqlite3_drv_t *drv, char *buf, int len); static int sql_exec_script(sqlite3_drv_t *drv, char *buf, int len);