FFY00 has joined #hpy
FFY00 has quit [Ping timeout: 252 seconds]
robert__ has joined #hpy
dalley has quit [Quit: Leaving]
dalley has joined #hpy
robert__ has quit [Remote host closed the connection]
robert__ has joined #hpy
<robert__> Is there a HPy equivalent to PyGetSetDef?
robert__ has quit [Ping timeout: 260 seconds]
robert__ has joined #hpy
<robert__> Looking through the source, there doesn't seem to be a way to add tp_getset, unless I somehow do it manually
<robert__> I'd love to help out with the project if ye are looking for extra people
<cfbolz> robert__: hey, welcome!
<phlebas> robert__: yes, you just create slots with `HPy_GET`, `HPy_SET`, or `HPy_GETSET`
<robert__> Ah, thank you
<robert__> I also just noticed it was mentioned in the porting section of the docs, I must be going blind lol
<mattip> robert__: there are suggestions for ways to help on https://hpyproject.org/
<mattip> "Current status and where we need help"
<robert__> Sounds good to me, I'l take a look a little later on
<cfbolz> robert__: welcome, in any case :-). we'd love some help, basically on anything you are interested in
<robert__> So, it is possible in Cpython to used the same func ptr for more than one name, is there maybe a way to recreate this behaviour in HPy?
<robert__> So, it is possible in Cpython to use the same func ptr for more than one name, is there maybe a way to recreate this behaviour in HPy?
<robert__> Sorry for the double post
<robert__> Also, should discussion on issues be discussed here or best kept to github?
<fangerer> robert__: also welcome from my side. Yes, this is possible but unfortunately, you cannot use the convenience macros `HPyDef_METH` or similar.
<fangerer> as an example, you can look at our ujson-hpy port: https://github.com/hpyproject/ultrajson-hpy/blob/hpy/python/objToJSON.c#L853
<fangerer> > Also, should discussion on issues be discussed here or best kept to github?
<fangerer> well, I would say on the issue
<fangerer> but you can ofc also discuss here but in that case, I would add a summary of the discussion to the issue
<robert__> Duly noted, thanks
FFY00 has joined #hpy
<antocuni> robert__: welcome!
<antocuni> re "using the same ptr for multiple def": yes, it's supported and the link that fangerer posted shows how
<antocuni> I don't think it's written anywhere in the docs (which is a pain point), but my original idea is that writing HPyDef = { ... } by hand is fully and officially supported
<antocuni> and that HPyDef_* macros are just extra niceties
<robert__> Awesome, thanks