-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
fix: remove R_SEXP_to_hrg
use R_SEXP_to_hrg_copy
to avoid memory leak
#1075
Conversation
Current Aviator status
This PR was merged using Aviator. See the real-time status of this PR on the Aviator webapp. Use the Aviator Chrome Extension to see the status of your PR within GitHub.
|
tools/stimulus/types-RC.yaml
Outdated
INOUT: |- | ||
if (0 != R_SEXP_to_hrg_copy(%I%, &%C%)) { | ||
igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); | ||
igraph_error("internal error in R_SEXP_to_hrg_copy()", __FILE__, __LINE__, IGRAPH_ENOMEM); |
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.
this one needs a fix too and then regenerate
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.
@Antonov548: Can you please tweak according to Szabolcs's comments?
@Antonov548 friendly reminder of #1075 (comment) 😸 |
tools/stimulus/types-RC.yaml
Outdated
@@ -76,6 +76,21 @@ CSTRING: | |||
OUT: |- | |||
PROTECT(%I% = Rf_mkCharLenCE(%C%, strlen(%C%), CE_UTF8)); | |||
|
|||
DOUBLE: |
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.
What is the purpose of this type and where it is used in functions.yaml
? It should always be the same as REAL
.
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.
OK, I see it's for igraph_almost_equals
and igraph_cmp_epsilon
, but these are not really meant to be exposed in high-level interfaces.
@ntamas, does Stimulus have some features already to reduce the code duplication between DOUBLE
and REAL
?
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.
Nope :(
@krlmlr @Antonov548 This PR has started to diverge form its original purpose. Would it be better to merge it and add unrelated fixes to independent PRs? |
As soon as you happy with changes. I also think that this PR already following not the main goal. |
I'm happy. |
f6779f6
to
c4b6541
Compare
Closes #1073