Return type and arguments template?
Don Clugston
dac at nospam.com.au
Wed Sep 27 04:07:02 PDT 2006
Johan Granberg wrote:
> Kirk McDonald wrote:
>> To be strictly accurate, Pyd takes the functions to be bound as alias
>> template parameters. You wrap a D function with:
>>
>> def!(functionName, "functionName");
>>
>> The "def" template function has a number of template arguments but no
>> function arguments. The above calls def with D's property syntax.
>>
>> Pyd does not (yet) use .mangleof in any capacity. The function name
>> must be specified explicitly as a string literal template argument.
>>
>> As for deriving the various bits of a function pointer or delegate
>> type, I suggest looking at the FuncMeta module in Tom S's Bind
>> package. It currently lives here:
>>
>> http://www.mat.uni.torun.pl/~h3r3tic/bind.rar
>>
>> I am currently in the midst of thrashing Pyd until it uses that package.
>
> Thanks for pointing me to the bind package (I did know about the pyd
> alias thing) as for the mangleof property is their complete
> documentation somewhere the d abi page had some TBDs in it.
There's no documentation, but see my meta.demangle and meta.nameof
modules in DDL on dsource; I believe it covers 100% of the cases
(std.demangle misses quite a few). If you find something it can't
demangle, let me know!
But seriously, you probably don't need anything other than meta.nameof.
More information about the Digitalmars-d-learn
mailing list