lua 64 位转换问题 [英] lua 64-bit transitioning issue

查看:40
本文介绍了lua 64 位转换问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的希望有一些帮助来解决这个问题.有没有人在需要 32 位和 64 位支持的应用程序中使用过 lua?我们目前正在过渡到 64 位,但在客户端编译的 lua 脚本方面遇到问题,我们无法使用 64 位版本重新编译自己.所以实际上我们需要能够在 64 位应用程序中加载使用 32 位 lua 编译的字节码文件.当我们尝试这样做时,我们会收到一条错误消息:

I really hope there is some help to get on this subject. Has anyone ever used lua in an application that needs to have both 32-bit and 64-bit support? We are currently transitioning to 64-bit but are having trouble with client compiled lua scripts that we can't recompile ourselves using the 64-bit version. So in effect we need to be able to load bytecode files compiled using 32-bit lua in a 64-bit application. When we try to do so we receive an error message:

test.bin.lua 中的虚拟机不匹配:size_t 的大小为 8,但读取为 4

virtual machine mismatch in test.bin.lua: size of size_t is 8 but read 4

当然,这是一个明显的 64 位转换问题.难的是在没有重新编译二进制文件的能力的情况下弄清楚如何处理它.

Well of course this is a clear 64bit transitioning problem. The hard thing is just to figure out what to do about it without the ability to recompile the binaries.

谢谢

推荐答案

调整 lundump.c 来​​读取 32 位字节码文件并不难.我已经在 Lua 邮件列表中为此发布了路线图.如果您有问题,请给我发电子邮件.

It's not hard to adapt lundump.c to read 32-bit bytecode files. I've posted a roadmap for this in the Lua mailing list. If you have problems, please send me email.

这篇关于lua 64 位转换问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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