OOPS THAT'S DANGEROUS
This commit is contained in:
parent
244eabbebf
commit
55cf06a54c
2
src/lt.c
2
src/lt.c
|
@ -49,7 +49,7 @@ static const char *errors[] = {
|
||||||
"LT_Error: Out of memory"
|
"LT_Error: Out of memory"
|
||||||
};
|
};
|
||||||
|
|
||||||
char *LT_TkNames[] = {
|
const char *LT_TkNames[] = {
|
||||||
// [marrub] So, this was an interesting bug. This was completely misordered from the enum.
|
// [marrub] So, this was an interesting bug. This was completely misordered from the enum.
|
||||||
// As can be guessed, this caused many issues. Seriously, all of them.
|
// As can be guessed, this caused many issues. Seriously, all of them.
|
||||||
"TOK_Colon", "TOK_Comma", "TOK_Div", "TOK_Mod", "TOK_Mul", "TOK_Query",
|
"TOK_Colon", "TOK_Comma", "TOK_Div", "TOK_Mod", "TOK_Mul", "TOK_Query",
|
||||||
|
|
16
src/lt.h
16
src/lt.h
|
@ -88,7 +88,7 @@ typedef struct
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
char *token;
|
const char *token;
|
||||||
char *string;
|
char *string;
|
||||||
int pos;
|
int pos;
|
||||||
} LT_Token;
|
} LT_Token;
|
||||||
|
@ -111,28 +111,28 @@ typedef struct LT_GarbageList_s
|
||||||
|
|
||||||
void LT_EXPORT LT_Init(LT_Config initCfg);
|
void LT_EXPORT LT_Init(LT_Config initCfg);
|
||||||
void LT_EXPORT LT_SetConfig(LT_Config newCfg);
|
void LT_EXPORT LT_SetConfig(LT_Config newCfg);
|
||||||
void LT_EXPORT LT_Quit();
|
void LT_EXPORT LT_Quit(void);
|
||||||
|
|
||||||
bool LT_EXPORT LT_Assert(bool assertion, const char *fmt, ...);
|
bool LT_EXPORT LT_Assert(bool assertion, const char *fmt, ...);
|
||||||
void LT_EXPORT LT_Error(int type); // [marrub] C use ONLY
|
void LT_EXPORT LT_Error(int type); // [marrub] C use ONLY
|
||||||
LT_AssertInfo LT_EXPORT LT_CheckAssert();
|
LT_AssertInfo LT_EXPORT LT_CheckAssert(void);
|
||||||
|
|
||||||
bool LT_EXPORT LT_OpenFile(const char *filePath);
|
bool LT_EXPORT LT_OpenFile(const char *filePath);
|
||||||
void LT_EXPORT LT_SetPos(int newPos);
|
void LT_EXPORT LT_SetPos(int newPos);
|
||||||
void LT_EXPORT LT_CloseFile();
|
void LT_EXPORT LT_CloseFile(void);
|
||||||
|
|
||||||
char *LT_EXPORT LT_ReadNumber();
|
char *LT_EXPORT LT_ReadNumber(void);
|
||||||
char *LT_EXPORT LT_ReadString(char term);
|
char *LT_EXPORT LT_ReadString(char term);
|
||||||
char *LT_EXPORT LT_Escaper(char *str, size_t pos, char escape);
|
char *LT_EXPORT LT_Escaper(char *str, size_t pos, char escape);
|
||||||
LT_Token LT_EXPORT LT_GetToken();
|
LT_Token LT_EXPORT LT_GetToken(void);
|
||||||
void LT_EXPORT LT_SkipWhite();
|
void LT_EXPORT LT_SkipWhite(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Variables
|
* Variables
|
||||||
* Don't include these into FFI declarations.
|
* Don't include these into FFI declarations.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern char *LT_EXPORT LT_TkNames[];
|
extern const char *LT_EXPORT LT_TkNames[];
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user