Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教下参数不支持问题 #78

Open
DemonKwong opened this issue Jan 3, 2020 · 1 comment
Open

请教下参数不支持问题 #78

DemonKwong opened this issue Jan 3, 2020 · 1 comment

Comments

@DemonKwong
Copy link

有些方法的参数是Object[]或者是short[]数组,但是框架代码里面只支持String和byte[],请问这种如何添加参数支持,还是说有其他办法转换参数?
image

@weechatfly
Copy link

都有FloatArray,IntArray...,照例子自己实现一个就行了
public class ShortArray extends BaseArray<short[]> implements PrimitiveArray<short[]>{
public ShortArray(short[] value) {
super(value);
}

@Override
public int length() {
    return value.length;
}

@Override
public void setData(int start, short[] data) {
    System.arraycopy(data, 0, value, start, data.length);
}

@Override
public UnicornPointer _GetArrayCritical(Emulator emulator, Pointer isCopy) {
    throw new UnicornException();
}

@Override
public void _ReleaseArrayCritical(Pointer elems, int mode) {
    throw new UnicornException();
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants