- 3
- 0
- 约1.27千字
- 约 2页
- 2023-11-15 发布于河南
- 举报
文档仅供参考
MTK 优美代码赏析 8:可变参数的 C 函数
对于可变参数函数,自己一直以来都很关注,尤其当自己刚才 C#上转到 C 时,一度曾研究 C
上的面向对象,将类似 printf 的函数归类为面向对象里的函数多态,当时只是一个主观感受。
今日仔细看了下代码的实现,发现使用 C 提供的公共接口是可以实现的,但这些接口是如何实
现的就不知了。。。
文件:stdarg.h
gcc 中的定义为:
/* Define the standard macros for the user,
if this invocation was from the user program. */
/* Define the standard macros for the user, if this invocation was from th
e user program. */
#define va_start(v,l) __builtin_va_start(v,l)
#define va_end(v) __builtin_va_end(v)
#define va_arg(v,l) __builtin_va_arg(v,l)
#if !defined(__STRICT_ANSI__) ||
您可能关注的文档
最近下载
- JT-T 791-2010公路涵洞通道用波纹钢管(板)_(高清版).pdf VIP
- 金属非金属矿井通风作业(课件)第9章矿井通风管理.pptx VIP
- Apogee Duet 3 用户手册说明书.pdf
- 2023新版浙江省监理统一用表式DOC.docx VIP
- AI Native 研发范式实践手册2026.docx
- ASTM D999-23 中文版(运输包装件正弦振动测试标准 完整原文 + 试验频率与持续时间).docx VIP
- 均线系统与趋势交易.pptx
- 给排水构造图集HD2017-S.pdf VIP
- 水平一(一年级)体育《立定跳远》公开课教案.doc VIP
- 金属非金属矿井通风作业(课件)第8章特殊条件矿井的通风措施.pptx VIP
原创力文档

文档评论(0)