1
0
mirror of https://github.com/lxsang/antd-lua-plugin synced 2025-02-21 18:22:47 +01:00

update to the new lib

This commit is contained in:
lxsang 2020-08-25 17:09:04 +02:00
parent 19172d1e64
commit 22d16d0f9e
6 changed files with 9 additions and 5 deletions

BIN
dist/lua-0.5.2b.tar.gz vendored

Binary file not shown.

View File

@ -1,4 +1,5 @@
#include <antd/ws.h>
#include <antd/base64.h>
#include "../lualib.h"
// add a length field, and
void lua_new_byte_array(lua_State*L, int n)

View File

@ -23,7 +23,7 @@
#define MAX_FN_ARGC 32
// define atomic type
typedef enum ffi_atomic_t {
typedef enum {
L_FFI_TYPE_VOID,
L_FFI_TYPE_UINT8,
L_FFI_TYPE_SINT8,
@ -45,7 +45,7 @@ typedef enum ffi_atomic_t {
L_FFI_TYPE_SLONG,
L_FFI_TYPE_LONGDOUBLE,
L_FFI_TYPE_POINTER
};
} ffi_atomic_t;
static const ffi_type* ffi_atomic_type_ptrs[] =
{
@ -400,7 +400,7 @@ static int l_ffi_atomic_type(lua_State* L)
lua_pushnil(L);
return 1;
}
type = ffi_atomic_type_ptrs[etype];
type = (ffi_type*)ffi_atomic_type_ptrs[etype];
lua_pushlightuserdata(L,type);
return 1;
}

View File

@ -29,7 +29,7 @@ static int l_json_decode_f (lua_State *L) {
buffer = malloc (length+1);
if (buffer)
{
fread (buffer, 1, length, f);
UNUSED(fread(buffer, 1, length, f));
}
fclose (f);
}

View File

@ -8,6 +8,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <dirent.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>

View File

@ -1,7 +1,9 @@
#define PLUGIN_IMPLEMENT 1
#include <dlfcn.h>
#include <antd/plugin.h>
#include <antd/scheduler.h>
#include <antd/dbhelper.h>
#include <sys/stat.h>
#include "lib/lualib.h"
static void* core_handle = NULL;