-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose arch
in Python bindings
#92
Expose arch
in Python bindings
#92
Conversation
A few differences in the behavior may be better solved with a separate getter/setter methods.
The default for an unset `type` was wrong and did not allow to find any packages without explicitly passing another `type` value.
I would prefer the
I would be fine with having that but I don't think its required at this point so its up to you.
It seems fine, it integrates well into the existing code. Separating it would be good. |
Ok, I'll leave None.
I also changed reference counting for COMPS_ObjList in the setter (
The write scenario looks a bit awkward without the conversion (see test changes —
Will do in the next update. |
See #91 (comment) - I'm not sure this is actually an appropriate idea, and it's not really necessary for the thing @alebastr was trying to do. |
See #91 for the rationale. I ended up doing that myself anyways (partially, as
<group arch="..."
and<groupid arch="..."
are yet to be implemented).Notes:
NULL
fromcomps_docpackage_arches
toNone
. But tracking what else could dereference((PyCOMPS_Sequence*)self)->list
when it's set toNULL
is a pain.The only viable alternative, IMO, is to init arches in comps_docpackage to an empty list when it's requested from the python bindings. Let me know which approach is preferred.
__PyCOMPS_set_arches
lacks conversion fromlist[str]
. Pretty sure I've seen the code for that in one of the source files (__pycomps_strlist_in
?), but extracting and applying it may be a bit of a pain.libcomps.StrSeq
here? If it's the right approach, I'd prefer to also move it to a separate header+source along with get/set/conversion helpers.Fixes #91