[SDL] SDLNetResolveIP coded
f91-men at nada.kth.se
Sat Apr 15 09:29:08 PDT 2000
>For the thread safe, we could use a Mutex, isn' it?
Yes, but you can't run more than one lookup at the same time. And mutices
don't protect functions returning pointers to static storage.
>About the error case, I prefer it to return me a string
>with the name of the host that it hasn't resolved.
Now it sometimes returns a pointer to static storage, sometimes to
malloc:ed memory. How do you know if you should call free()? Besides,
nothing prevents you from doing inet_ntoa() yourself.
More information about the SDL