Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion [NCI Feature Request] Handle Out Parameters
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Chromatic  
View profile  
 More options Apr 27 2004, 1:08 am
Newsgroups: perl.perl6.internals
From: bugs-par...@netlabs.develooper.com (Chromatic)
Date: Mon, 26 Apr 2004 22:08:00 -0700
Subject: [perl #29200] [NCI Feature Request] Handle Out Parameters
# New Ticket Created by  chromatic
# Please include the string:  [perl #29200]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=29200 >

I've just come across the following signature for which I want to write
NCI bindings:

/* Get the dimensions of a rendered string of text */
int SDLCALL TTF_SizeText(TTF_Font *font, const char *text, int *w, int
*h);

*w and *h are out parameters.

Per my reading of the NCI PDD and the code, this isn't yet supported.

I *could* fake it up by passing in an unmanaged struct and hoping that
the alignment all works out.  That's really not a long-term solution.
It may also have portability issues, besides the general ugliness.  (I
do love tweaking people who think that C has a working type system,
though.)

Ideally, there'd be an NCI signature that told the NCI wrapper to
generate and pass in the appropriate out parameters and then store them
in the appropriate registers, so I could call this from Parrot with:

        (width, height) = SizeText(font, text);

It does mean revamping PDD16 a bit though.  Dan?

-- c


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.