• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            woaidongmao

            文章均收錄自他人博客,但不喜標題前加-[轉貼],因其丑陋,見諒!~
            隨筆 - 1469, 文章 - 0, 評論 - 661, 引用 - 0
            數據加載中……

            lua5.1.dll 和 lua51.dll

            今天下載lua的Windows二進制發布luabinaries 的時候,發現luabinaries的發布包含兩個dll,lua5.1.dll,lua51.dll,其中lua5.1.dll大小合適,lua51.dll只有11K,感覺不像是個有用的lua dll,對此比較不解,查看了luabinaries的文檔,
            文檔中如此解釋:
            The LuaBinaries DLL packages have a dll proxy called "lua51.dll". It can be used to replace other "lua51.dll" released by other distributions. It will simply forward calls to the "lua5.1.dll". There is no compiled source code involved in the forwarding.
            也就是說,lua51.dll完全是一個lua5.1.dll的代理類,沒有任何實際的代碼,僅僅是做一個到lua5.1.dll的forwarding。
                不過文檔解釋了lua51.dll是什么,卻沒有解釋為啥會需要一個這樣的東西呢?我還從來沒有見過類似的情況。要說有一點點類似的情況的話,也是以前做反外掛的時候,知道可以通過替換現有的dll,并且完全模擬原來dll的接口,并將不需要hack的函數全部forwarding到原來的dll中。對于lua怎么會需要這樣的功能呢?
            于是我google了一下,發現了原因:
            The standard DLL name "lua51.dll" has been selected more than
            three years ago. Around twice every year someone comes along and
            thinks "Oh, we absolutely need a dot in the DLL version number".

            Alas, Windows does not like an extra dot in there. Many things
            break when you have an extra dot in DLL names. Depends on the
            version of the OS, on the specific system call, on the library or
            tool used ... it's hopeless. So please let's forget about it.

            --Mike
            來自lua-users.org的一個帖子 。
            原來是3年前有人確定了一個lua51.dll名字的動態庫,并且,有人覺得我們非常需要在5和1之間加一個點,不然lua的5.1版豈不是看成lua的51版了?
            對此,有人進一步提出了疑問 ,認為這個問題怎么這么久了竟然沒有人修復?
            接著有人回答了:
            But who's duty is to resolve the issue?

            It's clearly not an issue of Lua as a language. It's just a consequence of (a very popular) LuaBinaries once releasing lua5.1.dll that became a de facto binary standard, then authors of many third-party Lua libraries were releasing binary packages compatible with LuaBinaries.
            Note: I'm not blaming LuaBinaries; that was just one unfortunate decision that is difficult to be undone. --
            Shmuel

            我們知道了:
            LuaBinaries做出了一個錯誤的決定,但是已經發布了,很多第3方的庫也發布了,并且依賴于LuaBinaries的這個lua51.dll,于是:
            that was just one unfortunate decision that is difficult to be undone.
            那僅僅是一個過去做下,現在難以撤銷的不幸決定。。。。。。。。。。。。

                有的東西存在了,即使是不合理的存在,因為它存在了一段時間了,因為慣性,它還會存在在那里。編程中,這種情況經常出現。突然讓我想起上個項目中,大家經常對項目中蹩腳代碼存在原因的解釋:“歷史原因”。
                對于代碼來說,即使大家都知道可以重構,但是重構是有代價的,很多時候大家就妥協在歷史原因當中。
                對于語言來說,C++就是對歷史進行最大妥協而產生的語言,大家都承認,假如當年C++不兼容C的話,C++根本就得不到現在這樣的流行程度,也都承認,因為C++兼容C,(常常被稱為歷史的包袱)C++在語言的優美程度上損失了太多。
                想起國內某個大牛有過類似的感慨,“現在每做一個設計決定的時候都非常小心,因為那可能會被使用非常非常長的時間,當它還能正常工作的時候,甚至不會有人想要去重寫它“
                呵呵,僅僅將這個有趣的事件作為編程中的一個軼事來看吧。

            本文來自CSDN博客,轉載請標明出處:http://blog.csdn.net/vagrxie/archive/2010/07/23/5756804.aspx

            posted on 2010-12-27 12:37 肥仔 閱讀(2918) 評論(2)  編輯 收藏 引用 所屬分類: 腳本語言

            評論

            # re: lua5.1.dll 和 lua51.dll  回復  更多評論   

            我在src下的makefile中就只找到LUA5.1.dll,原來是這樣呀,還以為必須有LUA51.dll呢。感謝樓主共享。
            2011-01-02 08:14 | using9
            国产精品99精品久久免费| 亚洲国产精品无码久久| 国产精品欧美久久久久无广告| 无码久久精品国产亚洲Av影片| 久久无码人妻一区二区三区午夜| 久久国产高潮流白浆免费观看| 久久99精品国产| 久久亚洲日韩看片无码| 日日躁夜夜躁狠狠久久AV| 久久亚洲欧美日本精品| 一本色道久久88综合日韩精品| 久久精品国产清高在天天线| 久久成人国产精品一区二区| 午夜不卡久久精品无码免费| 久久久久一级精品亚洲国产成人综合AV区 | 久久亚洲AV永久无码精品| 亚洲人成精品久久久久 | 精品国产综合区久久久久久| 久久婷婷五月综合成人D啪| 久久美女网站免费| 亚洲国产精品一区二区久久hs| 亚洲综合精品香蕉久久网97| 奇米影视7777久久精品| 亚洲伊人久久成综合人影院| 成人精品一区二区久久| 99久久无色码中文字幕| 久久精品成人欧美大片| 亚洲美日韩Av中文字幕无码久久久妻妇| 亚洲人成精品久久久久| 久久男人AV资源网站| yellow中文字幕久久网 | 三级韩国一区久久二区综合 | 久久精品国产第一区二区| 久久久久无码精品国产| 亚洲va久久久噜噜噜久久狠狠 | 午夜精品久久久久久| 999久久久免费国产精品播放| 久久精品国产久精国产思思| 久久精品麻豆日日躁夜夜躁| 九九精品99久久久香蕉| 2021少妇久久久久久久久久|