mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 11:19:58 +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]);
|
Result:=Format('_StringToJString(_env, _JNIString(GUIDToString(%s)))', [Result]);
|
||||||
end;
|
end;
|
||||||
dtClass:
|
dtClass:
|
||||||
if TClassDef(d).CType in [ctObject, ctRecord] then
|
case TClassDef(d).CType of
|
||||||
Result:=Format('_%s_CreateObj(_env, %s)', [GetClassPrefix(d), Result])
|
ctObject, ctRecord:
|
||||||
else
|
Result:=Format('_%s_CreateObj(_env, %s)', [GetClassPrefix(d), Result]);
|
||||||
Result:=Format('_CreateJavaObj(_env, %s, %s)', [Result, GetTypeInfoVar(d)]);
|
ctInterface:
|
||||||
|
Result:=Format('_CreateJavaObj(_env, pointer(%s), %s)', [Result, GetTypeInfoVar(d)]);
|
||||||
|
else
|
||||||
|
Result:=Format('_CreateJavaObj(_env, %s, %s)', [Result, GetTypeInfoVar(d)]);
|
||||||
|
end;
|
||||||
dtProcType:
|
dtProcType:
|
||||||
Result:=Format('_CreateMethodPtrObject(_env, TMethod(%s), %s)', [Result, GetTypeInfoVar(d)]);
|
Result:=Format('_CreateMethodPtrObject(_env, TMethod(%s), %s)', [Result, GetTypeInfoVar(d)]);
|
||||||
dtEnum:
|
dtEnum:
|
||||||
|
Loading…
Reference in New Issue
Block a user