mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 10:48:12 +02:00
* pas2jni: Typecast interface to pointer.
git-svn-id: trunk@32616 -
This commit is contained in:
parent
2206a54b28
commit
f6b99c5d6a
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user