Re: [fpc-pascal] passing "array of const" into cdecl procvar

2016-05-13 Thread Sven Barth
Am 13.05.2016 21:47 schrieb "Maciej Izak" : > > 2016-05-13 17:58 GMT+02:00 Seth Grover : >> >> How can I do this? Is there any way for me to pass an array of const argument through directly to a cdecl'ed procvar call? > > > Sven is wrong, of course you can, but it requires some work. Maybe not much

Re: [fpc-pascal] passing "array of const" into cdecl procvar

2016-05-13 Thread Seth Grover
Thanks, Sven and Maciej, for the quick answers. Yikes, that example is a little bit ugly. Hm. Well fortunately there is another API in this library I'm wrapping that does almost the same thing. I think rather than go down that rabbit hole I'll see if I can rework what I'm doing to do using another

Re: [fpc-pascal] passing "array of const" into cdecl procvar

2016-05-13 Thread Maciej Izak
2016-05-13 17:58 GMT+02:00 Seth Grover : > How can I do this? Is there any way for me to pass an array of const > argument through directly to a cdecl'ed procvar call? > Sven is wrong, of course you can, but it requires some work. Maybe not much multi-platform and in few cases limited but works f

Re: [fpc-pascal] passing "array of const" into cdecl procvar

2016-05-13 Thread Sven Barth
Am 13.05.2016 17:58 schrieb "Seth Grover" : > How can I do this? Is there any way for me to pass an array of const argument through directly to a cdecl'ed procvar call? You can't, because an array of const/vararg of a cdecl function is something completely different from a normal Pascal array of c

[fpc-pascal] passing "array of const" into cdecl procvar

2016-05-13 Thread Seth Grover
I'm having a little trouble figuring out how to do the following: I have a procedural type defined as such: === type Tjson_pack = function( fmt : pchar; args : array of const) : pjson_t; cdecl; === I have a variable defined as: =