-
-
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
invalid ccall signatures in base #2901
Comments
I think #2814 is fixing the gmp ones. |
#2814 has the same incorrect type signatures I'm recording here. I was they can be fixed in second pass. I'm noting the signature of any ccall that shows up in file.jl, float.jl, fs.jl, grisu.jl, inference.jl, intset.jl, iobuffer.jl (todo: fftw.jl, io.jl through util.jl) |
I understand what you're doing, and it's great, I just don't see the need for two passes. You, or somebody else, is going to have to go through all this again to actually fix it. Instead of writing your findings here, write them in the code and commit. Seems much faster to me. |
jl_uv_fs_t_ptr_offset, and memchr, as identified in #2901
Partly, I opened this to be able to ask questions such as: |
jl_sizeof*, io, iobuffer, libc, loading, mmap, multi, path, task, utf8, util, sysimg, string
(todo: fftw, librandom, math, pcre, pointer, printf, process, reflection, repl, serialize, show, socket, stat, stream) |
I'm back. Is this about using |
The |
@JeffBezanson should we at least be consistent, or is it unimportant? I realize sizeof will pretty much always return small integers, but it is declared size_t in the standard. @andrioni that appears to be it. thanks. |
fftw, librandom, math, pcre, pointer, printf, process, reflection, repl, serialize, show, socket, stream, stat
(uvhandle and argv should be implicit conversions -- for improved gc) (all |
Unfortunately it is really nice to have the "easter egg" of allowing |
I'm fine with it as long as it works. I was just concerned it could get messed up, since it could be a concrete leaf type, which would be copied by-value when returning from the ccall. |
all of these need to be converted to using Cwchar_t instead of Char:
(should FileOffset be renamed Coff_t)? |
|
Complete summary of remaining issues from above is reproduced below:
all (should FileOffset be renamed Coff_t)? |
Now it uses Culong and Clong when needed.
Ok all done. |
(should FileOffset be renamed Coff_t)? |
The |
I thought that jl_spawn wasn't providing proper gc-rooting for its arguments (especially argv could be fixed). |
It's rooted in the caller. The risky thing there is |
in the files in base, array.jl through expr.jl, there are the following errors:
ccall(:memset, Ptr{T}, (Ptr{T}, Int32, Int32)ccall((:__gmpf_set_ui, :libgmp)
ccall((:__gmpf_set_si, :libgmp)
ccall((:__gmpf_pow_ui, :libgmp), Void, (Ptr{Void}, Ptr{Void}, Uint),
ccall((:__gmpz_set_si, :libgmp), Void, (Ptr{Void}, Int),
ccall((:__gmpz_set_ui, :libgmp), Void, (Ptr{Void}, Uint),
ccall((:__gmpz_get_si, :libgmp), Int, (Ptr{Void},)
ccall((:__gmpz_get_ui, :libgmp), Uint, (Ptr{Void},),
call((:__gmpz_mul_2exp, :libgmp),
(at this point I'm going to stop listing gmp, since it is almost all invalid)
ccall(:jl_readBuffer,Void,(Ptr{Void},Int32),(jl_strerror is exported but doesn't seem to exist?)(todo: fftw.jl through util.jl)
The text was updated successfully, but these errors were encountered: