【问题标题】:Can`t install perl module Crypt::TEAcan`t安装perl module crypt ::茶
【发布时间】:2016-02-15 16:49:46
【问题描述】:

当我尝试在 Windows 7 上将 Crypt::TEA 模块安装到 perl 5.18 时,显示错误:

TEA.xs:在函数“XS_Crypt__TEA_crypt”中: TEA.xs:58:9: 错误:无效的使用无效表达式

【问题讨论】:

  • 我得到同样的错误。 SvUPGRADE 不返回值,也不能以它的使用方式使用。

标签: windows perl perl-module xs perl5.18


【解决方案1】:

问题是this line:

    if (SvREADONLY(output) || !SvUPGRADE(output, SVt_PV))
        croak("cannot use output as lvalue");

SvUPGRADE() 是一个有两个 void 操作的宏,它不返回值。如果它失败了,它会发出嘶哑的声音。改成这样:

    if (!SvREADONLY(output)) 
        SvUPGRADE(output, SVt_PV);

【讨论】:

    猜你喜欢
    • 2022-11-20
    • 1970-01-01
    • 1970-01-01
    • 2022-10-21
    • 1970-01-01
    • 2022-09-27
    • 1970-01-01
    • 2022-08-14
    • 1970-01-01
    相关资源
    最近更新 更多