mirror of
https://github.com/lxsang/antd-lua-plugin
synced 2025-02-22 10:42:48 +01:00
update to the new lib
This commit is contained in:
parent
19172d1e64
commit
22d16d0f9e
BIN
dist/lua-0.5.2b.tar.gz
vendored
BIN
dist/lua-0.5.2b.tar.gz
vendored
Binary file not shown.
@ -1,4 +1,5 @@
|
|||||||
#include <antd/ws.h>
|
#include <antd/ws.h>
|
||||||
|
#include <antd/base64.h>
|
||||||
#include "../lualib.h"
|
#include "../lualib.h"
|
||||||
// add a length field, and
|
// add a length field, and
|
||||||
void lua_new_byte_array(lua_State*L, int n)
|
void lua_new_byte_array(lua_State*L, int n)
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#define MAX_FN_ARGC 32
|
#define MAX_FN_ARGC 32
|
||||||
|
|
||||||
// define atomic type
|
// define atomic type
|
||||||
typedef enum ffi_atomic_t {
|
typedef enum {
|
||||||
L_FFI_TYPE_VOID,
|
L_FFI_TYPE_VOID,
|
||||||
L_FFI_TYPE_UINT8,
|
L_FFI_TYPE_UINT8,
|
||||||
L_FFI_TYPE_SINT8,
|
L_FFI_TYPE_SINT8,
|
||||||
@ -45,7 +45,7 @@ typedef enum ffi_atomic_t {
|
|||||||
L_FFI_TYPE_SLONG,
|
L_FFI_TYPE_SLONG,
|
||||||
L_FFI_TYPE_LONGDOUBLE,
|
L_FFI_TYPE_LONGDOUBLE,
|
||||||
L_FFI_TYPE_POINTER
|
L_FFI_TYPE_POINTER
|
||||||
};
|
} ffi_atomic_t;
|
||||||
|
|
||||||
static const ffi_type* ffi_atomic_type_ptrs[] =
|
static const ffi_type* ffi_atomic_type_ptrs[] =
|
||||||
{
|
{
|
||||||
@ -400,7 +400,7 @@ static int l_ffi_atomic_type(lua_State* L)
|
|||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
type = ffi_atomic_type_ptrs[etype];
|
type = (ffi_type*)ffi_atomic_type_ptrs[etype];
|
||||||
lua_pushlightuserdata(L,type);
|
lua_pushlightuserdata(L,type);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ static int l_json_decode_f (lua_State *L) {
|
|||||||
buffer = malloc (length+1);
|
buffer = malloc (length+1);
|
||||||
if (buffer)
|
if (buffer)
|
||||||
{
|
{
|
||||||
fread (buffer, 1, length, f);
|
UNUSED(fread(buffer, 1, length, f));
|
||||||
}
|
}
|
||||||
fclose (f);
|
fclose (f);
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <dirent.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
#define PLUGIN_IMPLEMENT 1
|
#define PLUGIN_IMPLEMENT 1
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <antd/plugin.h>
|
#include <antd/plugin.h>
|
||||||
|
#include <antd/scheduler.h>
|
||||||
|
#include <antd/dbhelper.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include "lib/lualib.h"
|
#include "lib/lualib.h"
|
||||||
|
|
||||||
static void* core_handle = NULL;
|
static void* core_handle = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user