发明授权
US06199200B1 Method and system for supporting dual conventions for methods that return structures 失效
支持返回结构的方法的双重约定的方法和系统

Method and system for supporting dual conventions for methods that return structures
摘要:
A technique for providing support for multiple calling conventions for methods and procedures that return structures is provided. A source code of a client program may be compiled by either of two compilers, wherein one compiler employs a calling convention that is different from the first one. A binary library containing a procedure and a converter for each procedure returning a structure to a client program, is provided to support two calling conventions. If the client program is compiled by a compiler using a first calling convention, the program is compiled such that it calls the procedure directly and receives a result, a structure, via the first calling convention. Compiling the client program with a compiler using the second conventions results in calls to the procedure being routed to the converter, which calls the associated procedure, using the first calling convention. The converter receives the result from the procedure and returns the result to the client program using the second calling convention. A special modification to the signature of the procedure as it appears in the library source code, combined with the use of macros to generate a companion converter, permit a binary library to be built by a single compiler, such that the library supports the calling conventions for returning structures appropriate to two different compilers.
信息查询
0/0