-
Notifications
You must be signed in to change notification settings - Fork 163
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
Add GAP_NewRange
, GAP_NewObjIntFromInt
, GAP_ValueInt
to the libgap API
#4621
Conversation
src/libgap-api.c
Outdated
{ | ||
if (!fitsInIntObj(len)) return 0; | ||
if (!fitsInIntObj(low)) return 0; | ||
if (!fitsInIntObj(inc)) return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you just want to catch inc==0 here too? I don't think it's allowed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, done
GAP_NewRange
to the libgap APIGAP_NewRange
, GAP_NewObjIntFromInt
, GAP_ValueInt
to the libgap API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for curiosity: Why fitsInIntObj
and not fitsInObjInt
?
(ObjInt
is used in most situations in the src
files.)
(And there are two instances of "an GAP integer object" in comments.)
@ThomasBreuer "intobj" refers to immediate ints (cf. It is rather confusing. |
This is cleanup, but it will also be used in the GAP-Julia interface. Might also be useful for other libgap users.
TODO: This needs some more work, in particular the libgap API functions needs to be documented.