fx.serial: convert to new assembly build system
This commit is contained in:
+9
-1
@@ -13,7 +13,8 @@ set(fx_all_assemblies
|
||||
fx.runtime
|
||||
fx.collections
|
||||
fx.compression
|
||||
fx.io)
|
||||
fx.io
|
||||
fx.serial)
|
||||
|
||||
if (NOT DEFINED fx_assemblies)
|
||||
set(fx_assemblies ${fx_all_assemblies})
|
||||
@@ -67,4 +68,11 @@ if ("fx.compression" IN_LIST fx_assemblies)
|
||||
DEPENDENCIES fx.runtime)
|
||||
endif ()
|
||||
|
||||
if ("fx.serial" IN_LIST fx_assemblies)
|
||||
add_fx_assembly(
|
||||
NAME fx.serial
|
||||
NAMESPACES fx.serial
|
||||
DEPENDENCIES fx.runtime fx.collections)
|
||||
endif ()
|
||||
|
||||
add_executable(dynamic-test test/dynamic-test.c)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#include <fx/macros.h>
|
||||
#include <fx/reflection/assembly.h>
|
||||
|
||||
FX_ASSEMBLY_BEGIN()
|
||||
FX_ASSEMBLY_NAME("fx.serial");
|
||||
FX_ASSEMBLY_VERSION(1, 0, 0, 0);
|
||||
FX_ASSEMBLY_END()
|
||||
@@ -1,3 +1 @@
|
||||
include(../cmake/Templates.cmake)
|
||||
|
||||
add_fx_module(NAME serial DEPENDENCIES core ds)
|
||||
export_fx_namespace_details(fx.serial)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef FX_SERIAL_BITCODE_H_
|
||||
#define FX_SERIAL_BITCODE_H_
|
||||
|
||||
#include <fx/core/macros.h>
|
||||
#include <fx/macros.h>
|
||||
|
||||
FX_DECLS_BEGIN;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#ifndef FX_SERIAL_CTX_H_
|
||||
#define FX_SERIAL_CTX_H_
|
||||
|
||||
#include <fx/core/macros.h>
|
||||
#include <fx/core/misc.h>
|
||||
#include <fx/core/object.h>
|
||||
#include <fx/core/status.h>
|
||||
#include <fx/core/stream.h>
|
||||
#include <fx/macros.h>
|
||||
#include <fx/misc.h>
|
||||
#include <fx/object.h>
|
||||
#include <fx/status.h>
|
||||
#include <fx/stream.h>
|
||||
|
||||
FX_DECLS_BEGIN;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef FX_SERIAL_TOML_H_
|
||||
#define FX_SERIAL_TOML_H_
|
||||
|
||||
#include <fx/core/macros.h>
|
||||
#include <fx/macros.h>
|
||||
|
||||
FX_DECLS_BEGIN;
|
||||
|
||||
|
||||
+21
-21
@@ -1,14 +1,14 @@
|
||||
#include <fx/core/error.h>
|
||||
#include <fx/core/status.h>
|
||||
#include <fx/core/stringstream.h>
|
||||
#include <fx/ds/array.h>
|
||||
#include <fx/ds/datetime.h>
|
||||
#include <fx/ds/dict.h>
|
||||
#include <fx/ds/hashmap.h>
|
||||
#include <fx/ds/number.h>
|
||||
#include <fx/ds/string.h>
|
||||
#include <fx/collections/array.h>
|
||||
#include <fx/collections/datetime.h>
|
||||
#include <fx/collections/dict.h>
|
||||
#include <fx/collections/hashmap.h>
|
||||
#include <fx/collections/number.h>
|
||||
#include <fx/error.h>
|
||||
#include <fx/serial/ctx.h>
|
||||
#include <fx/serial/toml.h>
|
||||
#include <fx/status.h>
|
||||
#include <fx/string.h>
|
||||
#include <fx/stringstream.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -1400,7 +1400,7 @@ static void read_newline(struct ctx *ctx)
|
||||
}
|
||||
|
||||
enqueue_token(ctx, TOK_NEWLINE);
|
||||
ctx->ctx_result = FX_SUCCESS;
|
||||
ctx->ctx_result = FX_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
static void read_comment(struct ctx *ctx)
|
||||
@@ -1670,7 +1670,7 @@ static fx_result parse_timestamp(struct ctx *ctx, fx_object **result)
|
||||
tok->tok_value.time = NULL;
|
||||
|
||||
*result = (dt);
|
||||
return FX_SUCCESS;
|
||||
return FX_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
static fx_result parse_string(struct ctx *ctx, fx_object **result)
|
||||
@@ -1682,7 +1682,7 @@ static fx_result parse_string(struct ctx *ctx, fx_object **result)
|
||||
}
|
||||
|
||||
*result = (str);
|
||||
return FX_SUCCESS;
|
||||
return FX_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
static fx_result parse_int(struct ctx *ctx, fx_object **result)
|
||||
@@ -1708,7 +1708,7 @@ static fx_result parse_int(struct ctx *ctx, fx_object **result)
|
||||
}
|
||||
|
||||
*result = (val);
|
||||
return FX_SUCCESS;
|
||||
return FX_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
static fx_result parse_float(struct ctx *ctx, fx_object **result)
|
||||
@@ -1734,7 +1734,7 @@ static fx_result parse_float(struct ctx *ctx, fx_object **result)
|
||||
}
|
||||
|
||||
*result = (val);
|
||||
return FX_SUCCESS;
|
||||
return FX_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
static fx_result parse_bool(struct ctx *ctx, fx_object **result)
|
||||
@@ -1746,7 +1746,7 @@ static fx_result parse_bool(struct ctx *ctx, fx_object **result)
|
||||
}
|
||||
|
||||
*result = (val);
|
||||
return FX_SUCCESS;
|
||||
return FX_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
static fx_result parse_table_inline(struct ctx *ctx, fx_object **result)
|
||||
@@ -1763,7 +1763,7 @@ static fx_result parse_table_inline(struct ctx *ctx, fx_object **result)
|
||||
struct token *tok = peek_token(ctx);
|
||||
if (tok && tok->tok_type == TOK_RIGHT_BRACE) {
|
||||
*result = (table);
|
||||
return FX_SUCCESS;
|
||||
return FX_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
bool done = false;
|
||||
@@ -1797,7 +1797,7 @@ static fx_result parse_table_inline(struct ctx *ctx, fx_object **result)
|
||||
}
|
||||
|
||||
*result = (table);
|
||||
return FX_SUCCESS;
|
||||
return FX_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
static void skip_newlines(struct ctx *ctx)
|
||||
@@ -1878,7 +1878,7 @@ static fx_result parse_array_inline(struct ctx *ctx, fx_object **result)
|
||||
|
||||
DISABLE_EXTENDED_LEXING(ctx);
|
||||
*result = (array);
|
||||
return FX_SUCCESS;
|
||||
return FX_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
static fx_result parse_value(struct ctx *ctx, fx_object **result)
|
||||
@@ -2005,7 +2005,7 @@ static fx_result parse_key_value_pair(struct ctx *ctx, fx_dict *container)
|
||||
ctx_set_object_flags(ctx, value, OBJECT_KV_END_DEFINED);
|
||||
}
|
||||
|
||||
return FX_SUCCESS;
|
||||
return FX_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
static fx_result parse_table_header(
|
||||
@@ -2101,7 +2101,7 @@ static fx_result parse_table_header(
|
||||
|
||||
advance_token(ctx);
|
||||
*new_container = new_table;
|
||||
return FX_SUCCESS;
|
||||
return FX_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
static fx_result parse_array_header(
|
||||
@@ -2183,7 +2183,7 @@ static fx_result parse_array_header(
|
||||
|
||||
advance_token(ctx);
|
||||
*new_container = new_table;
|
||||
return FX_SUCCESS;
|
||||
return FX_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
static fx_result parse_root(struct ctx *ctx, fx_dict **out)
|
||||
|
||||
Reference in New Issue
Block a user