Google Groups Home
Help | Sign in
T and L parameter types for NCI
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
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
Dan Sugalski  
View profile
 More options Jan 2 2006, 1:36 pm
Newsgroups: perl.perl6.internals
From: d...@sidhe.org (Dan Sugalski)
Date: Mon, 2 Jan 2006 13:36:14 -0500
Local: Mon, Jan 2 2006 1:36 pm
Subject: T and L parameter types for NCI
I just went, after ages, and sync'd up with a current parrot for my
work project. Fixing things to work with the changes has been...
interesting.

The big hang up has been the removal of the T and L parameter types
for NCI calls. T was a string pointer array and L was a long array.
They're still documented in call_list.txt, there are still references
to them in parts of the library, and there are fragments of the code
for them in nativecall.pl.

Change 9260 did this back in september (yes, it has been ages, I'm
just syncing up now). This breaks the postgres.pir interface code --
making calls into postgres now isn't possible, as the interpreter
pukes and dies when you try.

Are there alternatives? The documentation for this stuff is worse now
than when I wrote it originally, and it's not clear what needs to be
done to duplicate the functionality of the removed call types.
--
                                Dan

--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
d...@sidhe.org                         have teddy bears and even
                                       teddy bears get drunk


    Reply to author    Forward  
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.
Leopold Toetsch  
View profile
 More options Jan 2 2006, 7:30 pm
Newsgroups: perl.perl6.internals
From: l...@toetsch.at (Leopold Toetsch)
Date: Tue, 3 Jan 2006 01:30:17 +0100
Local: Mon, Jan 2 2006 7:30 pm
Subject: Re: T and L parameter types for NCI

On Jan 2, 2006, at 19:36, Dan Sugalski wrote:

> The big hang up has been the removal of the T and L parameter types
> for NCI calls. T was a string pointer array and L was a long array.

[ ... ]

> Are there alternatives? The documentation for this stuff is worse now
> than when I wrote it originally, and it's not clear what needs to be
> done to duplicate the functionality of the removed call types.

Sorry for the documentation mismatch, but you know that's the hardest
part. Anyway using {Un,}ManagedStruct for any item more complex than a
simple type (incl. C-strings) is the way to go. There are by far too
many possible permutations of foo* items to be covered with just one or
two plain signature chars.

This pod:

$ perldoc docs/pmc/struct.pod

should cover most of it.

Some examples are e.g. t/pmc/nci.t: nci_pi - struct with ints
or runtime/parrot/library/libpcre.pir, which is using array of ints too.
The SDL libraries are also using rather complex structures built with
the *Struct interface.

BTW: while looking at runtime/parrot/library/postgres.pir and
runtime/parrot/library/postgres.declarations I discovered some
inconsistencies, especially with these more complex structures, e.g.:

dlfunc $P2, $P1, 'PQexecParams',   'pptiLTLLi'
dlfunc $P2, $P1, 'PQexecPrepared', 'pptit33i'

whike the C declarations are vastly the same, the PIR counterparts are
totally different.

HTH,
leo


    Reply to author    Forward  
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.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google