mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
cancel platform read interface
This commit is contained in:
parent
fc4882ca1f
commit
21a8f63d92
@ -1300,7 +1300,7 @@ TEST(pikaMain, class_demo_1_file) {
|
||||
Parser_multiLineToFile((char*)lines);
|
||||
char bytecodebuff[4096] = {0};
|
||||
FILE* f = __platform_fopen("pika_bytecode.bin", "r");
|
||||
__platform_fread(bytecodebuff, 1, 4096, f);
|
||||
fread(bytecodebuff, 1, 4096, f);
|
||||
pikaVM_runByteCode(self, (uint8_t*)bytecodebuff);
|
||||
/* assert */
|
||||
EXPECT_STREQ(log_buff[0], (char*)"hello world\r\n");
|
||||
|
@ -139,16 +139,3 @@ PIKA_WEAK size_t __platform_fwrite(const void* ptr,
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
PIKA_WEAK size_t __platform_fread(void* ptr,
|
||||
size_t size,
|
||||
size_t n,
|
||||
FILE* stream) {
|
||||
#ifdef __linux
|
||||
return fread(ptr, size, n, stream);
|
||||
#else
|
||||
__platform_printf("[error]: __platform_function need implementation!\r\n");
|
||||
while (1) {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -104,4 +104,3 @@ char __platform_getchar(void);
|
||||
FILE* __platform_fopen(const char* filename, const char* modes);
|
||||
int __platform_fclose(FILE* stream);
|
||||
size_t __platform_fwrite(const void* ptr, size_t size, size_t n, FILE* stream);
|
||||
size_t __platform_fread(void* ptr, size_t size, size_t n, FILE* stream);
|
||||
|
Loading…
x
Reference in New Issue
Block a user