Skip to content
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 MethodTable overwrite warning during build #25222

Merged
merged 1 commit into from
Dec 21, 2017
Merged

Conversation

timholy
Copy link
Sponsor Member

@timholy timholy commented Dec 21, 2017

No description provided.

@@ -1,5 +1,11 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

function MethodTable(m::Method)
ft = ccall(:jl_first_argument_datatype, Any, (Any,), m.sig)
ft == C_NULL && error("Method ", m, " does not correspond to a function type")
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function will return a null reference, not C_NULL, so this check doesn't work. Fortunately that shouldn't happen for any type that comes from a Method.sig field.

I also don't much like this being a constructor of MethodTable, since it doesn't construct one.

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. I could go back to calling it get_methodtable.

@timholy timholy merged commit 5fafb36 into master Dec 21, 2017
@timholy timholy deleted the teh/methodtable_warn branch December 21, 2017 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants