use Erlang typedefs instead of hardcoded types
for example, on Linux x86_64, ErlDrvSSizeT is long, not int
This commit is contained in:
@@ -148,9 +148,9 @@ static void stop(ErlDrvData handle) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle input from Erlang VM
|
// Handle input from Erlang VM
|
||||||
static int control(
|
static ErlDrvSSizeT control(
|
||||||
ErlDrvData drv_data, unsigned int command, char *buf,
|
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;
|
sqlite3_drv_t* driver_data = (sqlite3_drv_t*) drv_data;
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case CMD_SQL_EXEC:
|
case CMD_SQL_EXEC:
|
||||||
|
|||||||
@@ -97,8 +97,8 @@ typedef struct async_sqlite3_command {
|
|||||||
|
|
||||||
static ErlDrvData start(ErlDrvPort port, char* cmd);
|
static ErlDrvData start(ErlDrvPort port, char* cmd);
|
||||||
static void stop(ErlDrvData handle);
|
static void stop(ErlDrvData handle);
|
||||||
static int control(ErlDrvData drv_data, unsigned int command, char *buf,
|
static ErlDrvSSizeT control(ErlDrvData drv_data, unsigned int command, char *buf,
|
||||||
int len, char **rbuf, int rlen);
|
ErlDrvSizeT len, char **rbuf, ErlDrvSizeT rlen);
|
||||||
static int sql_exec(sqlite3_drv_t *drv, char *buf, int len);
|
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_bind_and_exec(sqlite3_drv_t *drv, char *buf, int len);
|
||||||
static int sql_exec_script(sqlite3_drv_t *drv, char *buf, int len);
|
static int sql_exec_script(sqlite3_drv_t *drv, char *buf, int len);
|
||||||
|
|||||||
Reference in New Issue
Block a user