Make rpmlua structures fully opaque outside rpmlua.c

Now that we finally can... opaque is good. Remove the "lua internal"
defines and move relevant includes where they belong.
No functional changes.
This commit is contained in:
Panu Matilainen 2019-02-21 12:28:42 +02:00
parent 62bd62286a
commit 770bbc5c56
2 changed files with 24 additions and 31 deletions

View File

@ -20,6 +20,7 @@
#include <spawn.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <stdarg.h>
#include <rpm/rpmio.h>
#include <rpm/rpmmacro.h>
@ -29,12 +30,34 @@
#include <rpm/rpmbase64.h>
#include "rpmio/rpmhook.h"
#define _RPMLUA_INTERNAL
#include "rpmio/rpmlua.h"
#include "rpmio/rpmio_internal.h"
#include "debug.h"
typedef struct rpmluapb_s * rpmluapb;
struct rpmlua_s {
lua_State *L;
size_t pushsize;
rpmluapb printbuf;
};
struct rpmluav_s {
rpmluavType keyType;
rpmluavType valueType;
union {
const char *str;
const void *ptr;
double num;
} key;
union {
const char *str;
const void *ptr;
double num;
} value;
int listmode;
};
#define INITSTATE(_lua, lua) \
rpmlua lua = _lua ? _lua : \
(globalLuaState ? globalLuaState : \

View File

@ -9,36 +9,6 @@ typedef enum rpmluavType_e {
RPMLUAV_NUMBER = 2
} rpmluavType;
#if defined(_RPMLUA_INTERNAL)
#include <stdarg.h>
#include <lua.h>
typedef struct rpmluapb_s * rpmluapb;
struct rpmlua_s {
lua_State *L;
size_t pushsize;
rpmluapb printbuf;
};
struct rpmluav_s {
rpmluavType keyType;
rpmluavType valueType;
union {
const char *str;
const void *ptr;
double num;
} key;
union {
const char *str;
const void *ptr;
double num;
} value;
int listmode;
};
#endif /* _RPMLUA_INTERNAL */
typedef struct rpmlua_s * rpmlua;
typedef struct rpmluav_s * rpmluav;