Skip to content

Commit 027ba40

Browse files
committed
Move away from legacy naming
1 parent d420a26 commit 027ba40

File tree

4 files changed

+34
-38
lines changed

4 files changed

+34
-38
lines changed

src/C/CGenerator.h

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,84 +11,84 @@ extern "C"
1111

1212
typedef UTTE_CVariable(*UTTE_CFunctionCallback)(UTTE_CVariable*, size_t, UTTE_CGenerator*);
1313

14-
typedef struct UVK_PUBLIC_API UTTE_CVariable
14+
typedef struct MLS_PUBLIC_API UTTE_CVariable
1515
{
1616
const char* value;
1717
UTTE_VariableTypeHint type;
1818
bool bDeallocate;
1919
UTTE_ParseResultStatus status;
2020
} UTTE_CVariable;
2121

22-
typedef struct UVK_PUBLIC_API UTTE_CParseResult
22+
typedef struct MLS_PUBLIC_API UTTE_CParseResult
2323
{
2424
UTTE_ParseResultStatus status;
2525
const char* result;
2626
} UTTE_CParseResult;
2727

28-
typedef struct UVK_PUBLIC_API UTTE_CFunction
28+
typedef struct MLS_PUBLIC_API UTTE_CFunction
2929
{
3030
const char* name;
3131
UTTE_CFunctionCallback function;
3232
bool bDeallocate;
3333
} UTTE_CFunction;
3434

35-
typedef struct UVK_PUBLIC_API UTTE_CPair
35+
typedef struct MLS_PUBLIC_API UTTE_CPair
3636
{
3737
char* key;
3838
char* val;
3939
} UTTE_CPair;
4040

4141
// Free with UTTE_CGenerator_Free
42-
UVK_PUBLIC_API UTTE_CGenerator* UTTE_CGenerator_Allocate();
42+
MLS_PUBLIC_API UTTE_CGenerator* UTTE_CGenerator_Allocate();
4343

44-
UVK_PUBLIC_API UTTE_InitialisationResult UTTE_CGenerator_loadFromFile(UTTE_CGenerator* generator, const char* location);
45-
UVK_PUBLIC_API UTTE_InitialisationResult UTTE_CGenerator_loadFromString(UTTE_CGenerator* generator, const char* str);
44+
MLS_PUBLIC_API UTTE_InitialisationResult UTTE_CGenerator_loadFromFile(UTTE_CGenerator* generator, const char* location);
45+
MLS_PUBLIC_API UTTE_InitialisationResult UTTE_CGenerator_loadFromString(UTTE_CGenerator* generator, const char* str);
4646

47-
UVK_PUBLIC_API UTTE_CParseResult UTTE_CGenerator_parse(UTTE_CGenerator* generator);
47+
MLS_PUBLIC_API UTTE_CParseResult UTTE_CGenerator_parse(UTTE_CGenerator* generator);
4848

4949
// If var->bDeallocate is set to true it will automatically deallocate the value after use
50-
UVK_PUBLIC_API UTTE_CFunctionHandle* UTTE_CGenerator_pushVariable(UTTE_CGenerator* generator, UTTE_CVariable var, const char* name);
50+
MLS_PUBLIC_API UTTE_CFunctionHandle* UTTE_CGenerator_pushVariable(UTTE_CGenerator* generator, UTTE_CVariable var, const char* name);
5151
// If f->bDeallocate is set to true it will automatically deallocate the value after use
52-
UVK_PUBLIC_API UTTE_CFunctionHandle* UTTE_CGenerator_pushFunction(UTTE_CGenerator* generator, UTTE_CFunction f);
52+
MLS_PUBLIC_API UTTE_CFunctionHandle* UTTE_CGenerator_pushFunction(UTTE_CGenerator* generator, UTTE_CFunction f);
5353

5454
// If var->bDeallocate is set to true it will automatically deallocate the value after use
55-
UVK_PUBLIC_API bool UTTE_CGenerator_setVariable(UTTE_CGenerator* generator, const char* name, const UTTE_CVariable* variable);
56-
UVK_PUBLIC_API bool UTTE_CGenerator_setFunction(UTTE_CGenerator* generator, const char* name, UTTE_CFunctionCallback event);
55+
MLS_PUBLIC_API bool UTTE_CGenerator_setVariable(UTTE_CGenerator* generator, const char* name, const UTTE_CVariable* variable);
56+
MLS_PUBLIC_API bool UTTE_CGenerator_setFunction(UTTE_CGenerator* generator, const char* name, UTTE_CFunctionCallback event);
5757

5858
// Data inside the return value is heap-allocated. Either call "UTTE_CGenerator_pushVariable" or deallocate it
5959
// yourself by calling "UTTE_CGenerator_tryFreeCVariable"
60-
UVK_PUBLIC_API UTTE_CVariable UTTE_CGenerator_makeArray(UTTE_CGenerator* generator, char** arr, size_t size);
60+
MLS_PUBLIC_API UTTE_CVariable UTTE_CGenerator_makeArray(UTTE_CGenerator* generator, char** arr, size_t size);
6161

6262
// Data inside the return value is heap-allocated. Either call "UTTE_CGenerator_pushVariable" or deallocate it
6363
// yourself by calling "UTTE_CGenerator_tryFreeCVariable"
64-
UVK_PUBLIC_API UTTE_CVariable UTTE_CGenerator_makeMap(UTTE_CGenerator* generator, UTTE_CPair* map, size_t size);
64+
MLS_PUBLIC_API UTTE_CVariable UTTE_CGenerator_makeMap(UTTE_CGenerator* generator, UTTE_CPair* map, size_t size);
6565

66-
UVK_PUBLIC_API void UTTE_CGenerator_Free(UTTE_CGenerator* generator);
66+
MLS_PUBLIC_API void UTTE_CGenerator_Free(UTTE_CGenerator* generator);
6767

6868
// Named "tryFreeCVariable" because it will not free the value if "UTTE_CVariable::bDeallocate" is not set to true
69-
UVK_PUBLIC_API void UTTE_CGenerator_tryFreeCVariable(const UTTE_CVariable* var);
69+
MLS_PUBLIC_API void UTTE_CGenerator_tryFreeCVariable(const UTTE_CVariable* var);
7070

7171
// Modifies a function from a handle
7272
// If function->bDeallocate is set to true it will automatically deallocate the value after use
7373
//
7474
// If you don't want to change the name of the function set function.name to an empty string
75-
UVK_PUBLIC_API void UTTE_CGenerator_modify(UTTE_CFunctionHandle* handle, UTTE_CFunction function);
75+
MLS_PUBLIC_API void UTTE_CGenerator_modify(UTTE_CFunctionHandle* handle, UTTE_CFunction function);
7676

7777
// Returns the name of a function from a function handle
78-
UVK_PUBLIC_API const char* UTTE_CGenerator_getName(UTTE_CFunctionHandle* handle);
78+
MLS_PUBLIC_API const char* UTTE_CGenerator_getName(UTTE_CFunctionHandle* handle);
7979

8080
// Returns a bool given a boolean value as a string
81-
UVK_PUBLIC_API bool UTTE_CoreFuncs_getBooleanV(const char* str);
81+
MLS_PUBLIC_API bool UTTE_CoreFuncs_getBooleanV(const char* str);
8282

8383
// Should be explicitly freed using "UTTE_CoreFuncs_freeArray"
84-
UVK_PUBLIC_API char** UTTE_CoreFuncs_getArray(const UTTE_CVariable* variable, size_t* size);
84+
MLS_PUBLIC_API char** UTTE_CoreFuncs_getArray(const UTTE_CVariable* variable, size_t* size);
8585

8686
// Should be explicitly freed using "UTTE_CoreFuncs_freeMap"
87-
UVK_PUBLIC_API UTTE_CPair* UTTE_CoreFuncs_getMap(const UTTE_CVariable* variable, size_t* size);
87+
MLS_PUBLIC_API UTTE_CPair* UTTE_CoreFuncs_getMap(const UTTE_CVariable* variable, size_t* size);
8888

89-
UVK_PUBLIC_API void UTTE_CoreFuncs_freeArray(char** array, size_t size);
89+
MLS_PUBLIC_API void UTTE_CoreFuncs_freeArray(char** array, size_t size);
9090

91-
UVK_PUBLIC_API void UTTE_CoreFuncs_freeMap(UTTE_CPair* map, size_t size);
91+
MLS_PUBLIC_API void UTTE_CoreFuncs_freeMap(UTTE_CPair* map, size_t size);
9292

9393
#ifdef __cplusplus
9494
}

src/Common.h

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,18 @@
44
#include <stddef.h>
55
#include <string.h>
66

7-
#ifdef UVK_LOG_EXPORT_FROM_LIBRARY
7+
#ifdef MLS_EXPORT_LIBRARY
88
#ifdef _WIN32
9-
#ifdef UVK_LIB_COMPILE
10-
#define UVK_PUBLIC_API __declspec(dllexport)
11-
#define UVK_PUBLIC_TMPL_API __declspec(dllexport)
9+
#ifdef MLS_LIB_COMPILE
10+
#define MLS_PUBLIC_API __declspec(dllexport)
1211
#else
13-
#define UVK_PUBLIC_API __declspec(dllimport)
14-
#define UVK_PUBLIC_TMPL_API
12+
#define MLS_PUBLIC_API __declspec(dllimport)
1513
#endif
1614
#else
17-
#define UVK_PUBLIC_API
18-
#define UVK_PUBLIC_TMPL_API
15+
#define MLS_PUBLIC_API
1916
#endif
2017
#else
21-
#define UVK_PUBLIC_API
22-
#define UVK_PUBLIC_TMPL_API
18+
#define MLS_PUBLIC_API
2319
#endif
2420

2521
#ifdef __cplusplus

src/CoreFuncs.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ namespace UTTE
5151
struct Function;
5252
class Generator;
5353

54-
class UVK_PUBLIC_API CoreFuncs
54+
class MLS_PUBLIC_API CoreFuncs
5555
{
5656
public:
5757
static Variable funcIf(std::vector<Variable>& args, Generator* generator) noexcept;

src/Generator.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace UTTE
1313
typedef UTTE_InitialisationResult InitialisationResult;
1414
typedef UTTE_ParseResultStatus ParseResultStatus;
1515

16-
struct UVK_PUBLIC_API Variable
16+
struct MLS_PUBLIC_API Variable
1717
{
1818
bool operator==(const Variable& variable) const noexcept;
1919

@@ -24,7 +24,7 @@ namespace UTTE
2424
bool _internalBoolComment = false;
2525
};
2626

27-
struct UVK_PUBLIC_API ParseResult
27+
struct MLS_PUBLIC_API ParseResult
2828
{
2929
ParseResultStatus status = UTTE_PARSE_STATUS_SUCCESS;
3030
const utte_string* result = nullptr;
@@ -34,13 +34,13 @@ namespace UTTE
3434

3535
using Func = Variable(std::vector<Variable>&, UTTE::Generator*);
3636

37-
struct UVK_PUBLIC_API Function
37+
struct MLS_PUBLIC_API Function
3838
{
3939
utte_string name;
4040
std::function<Func> function = [](std::vector<Variable>&, UTTE::Generator*) -> Variable{ return {}; };
4141
};
4242

43-
class UVK_PUBLIC_API Generator
43+
class MLS_PUBLIC_API Generator
4444
{
4545
public:
4646
Generator() = default;

0 commit comments

Comments
 (0)