-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 exported names from gc.c to have jl_gc_ prefix #11741
Conversation
|
@yuyichao You were the one that pointed to the |
And I said that it is in the embedding doc #11363 (comment). Just do a |
@@ -785,21 +785,21 @@ static inline int maybe_collect(void) | |||
|
|||
// preserved values | |||
|
|||
DLLEXPORT int jl_gc_n_preserved_values(void) | |||
int jl_gc_n_preserved_values(void) |
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.
Why?
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.
These were the ones I asked about originally, that were exported, but not used anywhere in Base or registered packages. I wasn't aware of the embedded document when I started... these functions aren't described there, do they need to be exported?
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.
At least I think they are potentially useful and shouldn't cause any issues to be exported.
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'll put the DLLEXPORTs back on thos... I just don't like having unused stuff cluttering up an API...
Ah, sorry, I missed the later comment you made - I was just going by the above comment! |
|
||
#endif | ||
|
||
DLLEXPORT void *jl_gc_managed_malloc(size_t sz); | ||
DLLEXPORT void *jl_gc_managed_realloc(void *d, size_t sz, size_t oldsz, int isaligned, jl_value_t* owner); | ||
void *jl_gc_managed_malloc(size_t sz); |
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 still has DLLEXPORT
at the implementation in gc.c
, at least with MSVC the linkage needs to be consistent. I'd err on the side of leaving this exported, since someone saw the need to put DLLEXPORT
on it in the first place.
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.
Already fixed, just waiting for Base.runtests() to complete again!
The change to |
This is great, thanks for taking care of it. |
I may have to pull out the update for jl_gc_enable to another PR though, since this one is a breaking change for embedders, apparently, 😞 so who knows when it might ever get merged! |
@@ -196,8 +196,8 @@ There are some functions to control the GC. In normal use cases, these should no | |||
|
|||
========================= ============================================================================== | |||
``void jl_gc_collect()`` Force a GC run | |||
``void jl_gc_disable()`` Disable the GC | |||
``void jl_gc_enable()`` Enable the GC | |||
``void jl_gc_enable(0)`` Disable the GC |
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.
Returns int
.
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.
Ah, right! Will fix.
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.
still needs fixing?
I'm not too worried about that. I would merge this. |
I am in the clear on this one anyway (whew!). Are there others? |
@waTeim The initial message gives the full list that I changed. |
OK, I've fixed my stupid mistake correcting the documentation of |
I found these also, that weren't from |
I think some (all?) of those are entry points for LLVM so we can't rename them, see #9339 (comment). But @vtjnash would know for sure. |
@pao Yes, I noticed them afterwards in a bunch of |
Or is |
@vtjnash About the |
All I can find (in all of the JuliaLang/julia repository) is the definition, and the setup of the name for LLVM.
|
julia's compiler uses |
Unfortunately, as I've shown in this PR, not consistently, which is why I was asking about those in the first place! |
There are also many many "internal" functions, that don't follow the |
``void jl_gc_collect()`` Force a GC run | ||
``void jl_gc_disable()`` Disable the GC | ||
``void jl_gc_enable()`` Enable the GC | ||
``void jl_gc_collect()`` Force a GC run |
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.
rst might be picky about the spacing here, need to check
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.
I did a full install build, and the documentation looked fine to me... did you see a problem?
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.
as long as the table looks right in the html-rendered version then should be fine
Since it's breaking, this probably deserves a NEWS entry. Other than that this looks fine to me. |
OK, very good point! Will do. |
👍 LGTM. |
072b9eb
to
0f13690
Compare
I've updated NEWS.md, but I noticed something else while updating it, |
@tkelman OK, changed to a sublist! |
Thanks, that looks better, but there's still an unaddressed comment, and needs a rebase probably due to your other news update |
What unaddressed comment? Am I missing something? |
#11741 (comment) - may have gotten lost in a rebase? |
I've also had a similar comment. In additional to the |
Yep, I lost that change, because I edited in directly on GitHub, and then when I next pushed... |
Put back some DLLEXPORT
943a9ea
to
9c90e05
Compare
The functions in the doc is either shown by how they are used, or by their signature e.g. this |
Use sublist in NEWS.md
9c90e05
to
a89f203
Compare
@yuyichao, let me know if you think the way I changed the documentation seems OK to you, thanks! |
I personally prefer listing the signature but this is also good for me. |
The signature didn't give what the |
All looks good to me. |
Anybody willing to merge this? (I'd love to pare down my plethora of outstanding PRs before Wednesday! 😀) |
Fix exported names from gc.c to have jl_gc_ prefix
Thanks! |
Changed exported names in
gc.c
to have thejl_gc_
prefix to prevent name collisions when julia is linked with other code.gc_wb*
->jl_gc_wb*
gc_queue_root
->jl_gc_queue_root
allocobj
->jl_gc_allocobj
alloc_[0-4]w
->jl_gc_alloc_*w
diff_gc_total_bytes
->jl_gc_diff_total_bytes
sync_gc_total_bytes
->jl_gc_sync_total_bytes