什么是垫片? [英] What is a Shim?

查看:122
本文介绍了什么是垫片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

垫片的定义是什么?

推荐答案

来自维基百科:

在计算机编程中, shim 是小型库,可透明地拦截API,更改传递的参数,处理操作本身或将操作重定向到其他地方.通常,当API的行为发生变化时就会产生垫片,从而导致仍依赖于较旧功能的较旧应用程序出现兼容性问题.在这些情况下,较旧的API仍可以由较新的代码之上的瘦兼容性层支持. Shims还可以用于在与开发目的不同的软件平台上运行程序.

In computer programming, a shim is a small library that transparently intercepts an API, changing the parameters passed, handling the operation itself, or redirecting the operation elsewhere. Shims typically come about when the behaviour of an API changes, thereby causing compatibility issues for older applications that still rely on the older functionality. In these cases, the older API can still be supported by a thin compatibility layer on top of the newer code. Shims can also be used to run programs on different software platforms than they were developed for.

这篇关于什么是垫片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆