1--[[
2Copyright (c) 2019, Vsevolod Stakhov <vsevolod@highsecure.ru>
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8    http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15]]--
16
17--[[[
18-- @module lua_ffi/common
19-- Common ffi definitions
20--]]
21
22local ffi = require 'ffi'
23
24ffi.cdef[[
25struct GString {
26  char  *str;
27  size_t len;
28  size_t allocated_len;
29};
30struct GArray {
31  char *data;
32  unsigned len;
33};
34typedef void (*ref_dtor_cb_t)(void *data);
35struct ref_entry_s {
36	unsigned int refcount;
37	ref_dtor_cb_t dtor;
38};
39
40void g_string_free (struct GString *st, int free_data);
41void g_free (void *p);
42long rspamd_snprintf (char *buf, long max, const char *fmt, ...);
43]]
44
45return {}