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: =

Re: [fpc-pascal] TJSONboolean and locale settings

2016-05-13 Thread Dmitry Boyarintsev
On Fri, May 13, 2016 at 10:32 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > So does the JSON Standard define saved boolean values as hard-coded > English “True” and “False” values, no matter the locale? > What's case where "true"/"false" are localized? thanks, Dmitry __

Re: [fpc-pascal] TJSONboolean and locale settings

2016-05-13 Thread Michael Van Canneyt
On Fri, 13 May 2016, Graeme Geldenhuys wrote: On 2016-05-13 15:05, Michael Van Canneyt wrote: Yes, because 'GetAsJSON' is not dependent on locale, but returns hardcoded values. OK, thanks for clarifying that for FPC. So does the JSON Standard define saved boolean values as hard-coded Engli

Re: [fpc-pascal] TJSONboolean and locale settings

2016-05-13 Thread Graeme Geldenhuys
On 2016-05-13 15:05, Michael Van Canneyt wrote: > Yes, because 'GetAsJSON' is not dependent on locale, but returns hardcoded > values. OK, thanks for clarifying that for FPC. So does the JSON Standard define saved boolean values as hard-coded English “True” and “False” values, no matter the local

Re: [fpc-pascal] TJSONboolean and locale settings

2016-05-13 Thread Michael Van Canneyt
On Fri, 13 May 2016, Graeme Geldenhuys wrote: Hi, Is TJSONboolean, and it’s internal BoolToStr(AValue, True) and StrToBool() calls, affected by locale settings? GetAsString is. For example: My locale is en_GB and I store a Boolean (True) value to a JSON file, which results in a string va

[fpc-pascal] TJSONboolean and locale settings

2016-05-13 Thread Graeme Geldenhuys
Hi, Is TJSONboolean, and it’s internal BoolToStr(AValue, True) and StrToBool() calls, affected by locale settings? For example: My locale is en_GB and I store a Boolean (True) value to a JSON file, which results in a string value “True”. If I now read that JSON file on a system with locale af_ZA

Re: [fpc-pascal] FCL licensing choice

2016-05-13 Thread Graeme Geldenhuys
On 2016-05-13 08:30, Jonas Maebe wrote: > No, because it requires every binary distribution (i.e., every > compiled program that uses this FCL unit) to include a copyright > notice attributing the use of that unit. Just to be clear (in case others don't know this), the above is only required in th

Re: [fpc-pascal] FCL licensing choice

2016-05-13 Thread Jonas Maebe
Graeme Geldenhuys wrote: Is it a requirement that all FCL code be LGPL licensed? I’ve randomly picked about 8 or so directories and all the code I reviewed was LGPL 2.1 licensed. + linking exception. Can code be contributed with the “Simplified BSD License” (that’s the latest 2-clause BSD li