c++的名字修饰符的另一个game programmer gems的解释

来源:互联网 发布:python 文本相似性 编辑:程序博客网 时间:2024/06/02 16:27

_cdecl.The caller cleans up the stack,meaning that it is responsible for poping its own arguments off the stack after the call completes.This convention is required for variable argument functions becaouse the called function doesn't  neccessarily have the information it needs to pop the correct number of arguments.This is the default calling convention for static and global functions in Cand C++.

_stdcall.The called function cleans up the stack.This is the standard convention used for Win32 API calls,probably becaouse it is more efficient in terms of client code size.

原创粉丝点击