mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
fix bytecode_lib error on MSVC
This commit is contained in:
parent
4ac3eaf76f
commit
9aedd6e511
@ -343,9 +343,11 @@ int Lib_loadLibraryFileToArray(char* origin_file_name, char* out_folder) {
|
||||
char* array_name = strsGetLastToken(&buffs, origin_file_name, '/');
|
||||
array_name = strsReplace(&buffs, array_name, ".", "_");
|
||||
__platform_printf(" loading %s[]...\n", array_name);
|
||||
pika_fputs("#include \"PikaPlatform.h\"\n",
|
||||
fp);
|
||||
pika_fputs("/* warning: auto generated file, please do not modify */\n",
|
||||
fp);
|
||||
pika_fputs("__attribute__((aligned(4))) const unsigned char ", fp);
|
||||
pika_fputs("PIKA_BYTECODE_ALIGN const unsigned char ", fp);
|
||||
pika_fputs(array_name, fp);
|
||||
pika_fputs("[] = {", fp);
|
||||
char byte_buff[32] = {0};
|
||||
|
@ -51,6 +51,13 @@
|
||||
#define PIKA_WEAK
|
||||
#endif
|
||||
|
||||
/* align for bytecode */
|
||||
#if defined(_WIN32)
|
||||
#define PIKA_BYTECODE_ALIGN
|
||||
#else
|
||||
#define PIKA_BYTECODE_ALIGN __attribute__((aligned(4)))
|
||||
#endif
|
||||
|
||||
/* OS */
|
||||
#ifdef __RTTHREAD__
|
||||
#include <rtthread.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user