ABI 编辑

General Details

This article describes the calling conventions with respect to js-ctypes while programming x86 and x86-64/x64/AMD64 architectures. A calling convention is an implementation-level (low-level) scheme regarding how subroutines receive parameters from their caller and how they revert.

http://en.wikipedia.org/wiki/X86_calling_conventions

ABI

ABI stands for  "Application Binary Interface".

http://en.wikipedia.org/wiki/Application_binary_interface

OS Specific

Windows

Details with Respect to js-ctypes

This explains how to use it in the js-ctypes scope.

Three different ABIs exist: ctypes.default_abi, ctypes.stdcall_abi, and ctypes.winapi_abi.

ctypes.default_abi

Corresponds to cdecl; standard libraries use this ABI. You can also use this for various system calls,including those on Mac OS X and Linux.

ctypes.thiscall_abi

  More information is available at Bugzilla :: 552533.

ctypes.stdcall_abi

Used for calling functions declared with stdcall on Windows. These functions' names are automatically mangled for you by js-ctypes.

ctypes.winapi_abi

Used for calling Windows system functions. These are declared as stdcall on Windows, but do not have mangled names like those used by stdcall_abi above.

OS Specific

WIN32 and OS2

Callbacks in js-ctypes under these operating systems use a different ABI than regular function declarations.

Other

All other operating systems use ctypes.default_abi as their calling convention for all function declarations.

Method overview

String toSource()
String toString()

Methods

toSource()

Returns the string "ctypes.***_abi".

String toSource()
Parameters

None.

Return value

A JavaScript expression that evaluates to the ABI.

toString()

Returns a string identifying the ABI.

String toString();
 
Parameters

None.

Return value

A string identifying the ABI.

See Also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:78 次

字数:5029

最后编辑:6年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文