codec1 has quit [Read error: Connection reset by peer]
<strmpnk>
Is there a reason I can make an FFI call that returns a Pointer[None] and that works but I can't wrap that in a single field struct? Does the FFI assume a returned struct is a pointer rather than immediate?
<strmpnk>
I'm trying to add some type safety to some win32 api FFI calls with a MaybeHandle type. I can't use MaybePointer since they don't use 0 for the invalid value.
<strmpnk>
I can write a wrapper around each call anyway but it'd be nice to tag things with this type to make it less error prone when writing the wrappers.
<strmpnk>
Also, I found a crash in the compiler when calling embed on Pointer[None]. I haven't followed up with that yet but I'll try to create a small example this weekend.
<strmpnk>
I wonder if this is an ABI issue. I would have assumed it would only involve the word-size of the struct (Only one USize involved here) but perhaps the FFI is interpreting this differently.
<strmpnk>
I'll assume it's a windows calling convention or ABI thing for now.
_whitelogger has joined #ponylang
chasegeaton has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
chasegeaton has quit [Read error: Connection reset by peer]
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
alxs has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
khan has joined #ponylang
dane_ has quit [Quit: Page closed]
khan has quit [Client Quit]
khan has joined #ponylang
endformationage has joined #ponylang
dipin has joined #ponylang
Pyrrh_ has joined #ponylang
Pyrrh has quit [Ping timeout: 265 seconds]
Pyrrh_ is now known as Pyrrh
inoas has quit [Quit: inoas]
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
<strmpnk>
Outside of just knowing, is there a way to ask Pony for the size of a struct? These are common in some C APIs there the struct may have expanded fields over many versions, so intermediate code needs to know how many bytes to copy when propagating the value.
<SeanTAllen>
I dont think so, but Benoit would certainly know better than I. That would be a useful addition I believe (assuming it doesnt exist)
gokr has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
user10032 has quit [Ping timeout: 260 seconds]
gokr has quit [Ping timeout: 240 seconds]
chasegeaton has joined #ponylang
<chasegeaton>
Hi, I am trying to create an HTTPClient using `HTTPClient(NetAuth(env.root), SSLContext(), false)`, but I am getting an error saying that the type of env.root (AmbientAuth val | None val) is not a subtype of parameter AmbientAuth val. How can I pass env.root into NetAuth? Thanks!