[fpc-pascal] Converting header with va_list

Jeppe Græsdal Johansen jjohan07 at student.aau.dk
Wed Jan 18 17:16:19 CET 2012


Den 17-01-2012 16:19, Felipe Monteiro de Carvalho skrev:
> Hello,
>
> I need to convert this:
>
> [felipe at localhost android]$ gedit
> ~/Programas/android-ndk-r5/platforms/android-8/arch-arm/usr/include/jni.h
>
> void        (*CallStaticVoidMethodV)(JNIEnv*, jclass, jmethodID, va_list);
>
> To Pascal. I tryed using array of const, but it keeps crashing in this call =(
>
>        CallStaticVoidMethodV:procedure(Env:PJNIEnv;AClass:JClass;MethodID:JMethodID;Args:array
> of const);{$ifdef mswindows}stdcall;{$else}cdecl;{$endif}
>
> Any ideas if using array of const is a good idea or if something else
> is better? My target is Android (via arm-linux in FPC)
>
> thanks,
Does this work?
CallStaticVoicMethodV: 
procedure(Env:PJNIEnv;AClass:JClass;MethodID:JMethodID); {$ifdef 
mswindows}stdcall;{$else}cdecl;{$endif} varargs;

I recon that it is almost the same, according to the FPC documentation



More information about the fpc-pascal mailing list