* pas2jni: Typecast interface to pointer.

git-svn-id: trunk@32616 -
This commit is contained in:
yury 2015-12-07 23:32:22 +00:00
parent 2206a54b28
commit f6b99c5d6a

View File

@ -1853,10 +1853,14 @@ begin
Result:=Format('_StringToJString(_env, _JNIString(GUIDToString(%s)))', [Result]);
end;
dtClass:
if TClassDef(d).CType in [ctObject, ctRecord] then
Result:=Format('_%s_CreateObj(_env, %s)', [GetClassPrefix(d), Result])
else
Result:=Format('_CreateJavaObj(_env, %s, %s)', [Result, GetTypeInfoVar(d)]);
case TClassDef(d).CType of
ctObject, ctRecord:
Result:=Format('_%s_CreateObj(_env, %s)', [GetClassPrefix(d), Result]);
ctInterface:
Result:=Format('_CreateJavaObj(_env, pointer(%s), %s)', [Result, GetTypeInfoVar(d)]);
else
Result:=Format('_CreateJavaObj(_env, %s, %s)', [Result, GetTypeInfoVar(d)]);
end;
dtProcType:
Result:=Format('_CreateMethodPtrObject(_env, TMethod(%s), %s)', [Result, GetTypeInfoVar(d)]);
dtEnum: