On Mon, 2004-04-26 at 23:15, Leopold Toetsch wrote: > > Per my reading of the NCI PDD and the code, this isn't yet supported. > > Then the POD is missing some items: > > ,--[ src/call_list.txt ] > | # 2 - pointer to short > | # 3 - pointer to int > | # 4 - pointer to long > `-----------------------
Patch attached for those. > > (width, height) = SizeText(font, text); > > This signature doesn't match the call's signature. Shuffling return > values around like that isn't really pleasant and you don't get it that > way from C. That's true. Still, there has to be some extra support for out parameters, or else NCI will walk all over the newly-updated contents of the registers with the return results. I patched pcf_i_pt33() manually to prevent it from assigning to I5 and the following call does exactly what I want: (width, height) = SizeText( font, text, width, height ) I don't particularly mind if I have to give it a signature of 'ipt3!3!' or whatever to signify that I want the NCI sub to write into the appropriate registers, but I do want to be able to fetch the values it writes. -- c
Index: docs/pdds/pdd16_native_call.pod =================================================================== RCS file: /cvs/public/parrot/docs/pdds/pdd16_native_call.pod,v retrieving revision 1.7 diff -u -u -r1.7 pdd16_native_call.pod --- docs/pdds/pdd16_native_call.pod 2 Mar 2004 12:25:01 -0000 1.7 +++ docs/pdds/pdd16_native_call.pod 28 Apr 2004 03:42:10 -0000 @@ -75,6 +75,18 @@ long. An integer type. You know the drill. +=item 2 + +A pointer to a short, taken from an I register. + +=item 3 + +A pointer to an int, taken from an I register. + +=item 4 + +A pointer to a long, taken from an I register. + =item f float. F register denizen.