Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: candycanearter07 Newsgroups: comp.os.linux.misc,comp.os.linux.advocacy Subject: Re: GIMP 3.0.0-RC1 Date: Thu, 13 Feb 2025 21:40:03 -0000 (UTC) Organization: the-candyden-of-code Lines: 26 Message-ID: References: <655acbf6-05e5-69ff-8a44-9f7075aafa2e@example.net> <20250210093054.00001375@gmail.com> <20250212081704.00003ce1@gmail.com> <20250212132107.00001351@gmail.com> Injection-Date: Thu, 13 Feb 2025 22:40:04 +0100 (CET) Injection-Info: dont-email.me; posting-host="8fa9ad296acdaa1aa9c900e59fb16f40"; logging-data="3251670"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18SqUsf30T8xxuT4eEtQEX4kiOdlWVanlGIEEIRtweU7Q==" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:6zOXpGt9kgrnGVYCuodcqW6ktDY= X-Face: b{dPmN&%4|lEo,wUO\"KLEOu5N_br(N2Yuc5/qcR5i>9-!^e\.Tw9?/m0}/~:UOM:Zf]% b+ V4R8q|QiU/R8\|G\WpC`-s?=)\fbtNc&=/a3a)r7xbRI]Vl)r<%PTriJ3pGpl_/B6!8pe\btzx `~R! r3.0#lHRE+^Gro0[cjsban'vZ#j7,?I/tHk{s=TFJ:H?~=]`O*~3ZX`qik`b:.gVIc-[$t/e ZrQsWJ >|l^I_[pbsIqwoz.WGA] wrote at 21:21 this Wednesday (GMT): > On Wed, 12 Feb 2025 20:20:04 -0000 (UTC) > candycanearter07 > wrote: > >> If you really need to, you can also pass by pointer? > > I admit I'm not deeply familiar with this, but AFAICT Pascal pointers > enforce type-safety as defined by the rest of the language, meaning > that (IIUC) you can pass a function that expects a pointer to an ARRAY > [1..10] OF CHAR any given ARRAY [1..10] OF CHAR, but trying to give it > a pointer to an ARRAY [1..15] OF CHAR would still be a type mismatch. > > So what do you do, then? Refactor the function to accept a pointer to a > single CHAR? Add individual wrapper functions to decompose arrays of > specific sizes into individual elements, and call the actual function > once per element? What if the function logic can't be serialized across > individual elements? [snip] Well, as long as you CAN do [] notation on a char pointer and also pass the size as an integer, I GUESS you could do that to work around it? Still does feel stupid though. -- user is generated from /dev/urandom