[200_26] 将 (scheme file) 相关代码从 s7.c 迁移到 s7_scheme_file.c#497
Open
[200_26] 将 (scheme file) 相关代码从 s7.c 迁移到 s7_scheme_file.c#497
Conversation
da-liii
reviewed
Mar 5, 2026
src/s7_scheme_file.c
Outdated
| #include <errno.h> | ||
|
|
||
| /* -------------------------------- delete-file -------------------------------- */ | ||
| s7_pointer g_delete_file(s7_scheme *sc, s7_pointer args) |
Contributor
There was a problem hiding this comment.
这个接口需要移除,因为 goldfish.hpp 里面重新实现了
s7内置的实现无法处理中文文件名(在Windows上面)
- 创建 s7_scheme_file.h 和 s7_scheme_file.c - 迁移 g_access, g_file_mtime, g_unlink 函数 - 完全移除 g_delete_file(已在 goldfish.hpp 中重新实现) - 移除 s7.c 中的 delete_file_symbol 和相关注册 - 清理未使用的 file_probe 函数 - 更新 xmake.lua 添加新文件编译 测试通过: 28 correct, 0 failed Co-Authored-By: Xiao Liyu
6d4c2e2 to
2606f69
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
任务目标
完成 Issue #457:将 (scheme file) 相关代码从 s7.c 迁移到独立的 s7_scheme_file.c
改动内容
新增文件
src/s7_scheme_file.h- file 相关函数声明src/s7_scheme_file.c- g_delete_file, g_access, g_file_mtime, g_unlink 实现devel/200_26.md- 任务文档修改文件
src/s7.c- 移除旧实现,添加#include "s7_scheme_file.h"xmake.lua- 添加src/s7_scheme_file.c编译移除的代码
file_probe函数(未使用)g_delete_file函数(迁移到新文件)g_file_mtime函数(迁移到新文件)g_unlink函数(迁移到新文件)g_access函数(迁移到新文件)验证结果
xmake b goldfishbin/goldfish -m r7rs tests/goldfish/scheme/file-test.scm(28 correct, 0 failed)关联 Issue
Closes #457