Adding modifiers to NCI
Vadim Konovalov
vadrer at gmail.com
Mon Dec 22 23:05:00 UTC 2008
在 Monday 22 December 2008 05:10:14,Simon Cozens 写道:
> Hello all,
> I've started looking at adding Postgres bindings to DBDI, and hit a bit
> of a wall; it needs its bind parameters passed in as an array of
> strings. Now there is an undocumented "T" signature for char** that's
> been sitting there for a while, but before I found it I got a bit
> frustrated about the state of NCI signatures. They've expanded a little
> randomly, whether it's the fact that "s" means a short but "S" means a
> string, or the 2/3/4 grabbing-numbers-from-a-PMC signature.
>
Last time I've tried to use "3" - pointer to int - I completely failed :(
So whatever you do please do, there are chances that pointer to int start
working :)
> The PDD states that:
>
> At some point punctuation may be used as modifiers on the function
> parameters, in which case each parameter may be represented by multiple
> letters.
>
> I think we've reached that point. My plan is to add two modifiers: "$"
> means "get this type from a PDD" and "@" means "this is an array". Hence
> 2/3/4 would be replaced by $s, $i and $l respectively.
> "T" would probably become "@S".
Sorry for the question - how a type could be got from a PDD?
>
> I don't think we should go down the road of a completely new
> DSL for function signatures - please no, let's not overcomplicate until
> we need it - but I think we do need something a little more flexible,
> and a little better organised, than what we have already.
>
Best regards,
Vadim
More information about the parrot-dev
mailing list