Mercurial > pub > dyncall > dyncall
comparison dynload/dynload_unix.c @ 320:85c80b0c021c
- Darwin/macos fix for dlGetLibraryPath() to correctly fail on bogus handles
- Changelog updated
- readme tweak
author | Tassilo Philipp |
---|---|
date | Wed, 13 Nov 2019 17:15:43 +0100 |
parents | 3df50603afa9 |
children | 2f64957d6a46 |
comparison
equal
deleted
inserted
replaced
319:993550558ac5 | 320:85c80b0c021c |
---|---|
143 if(lib) { | 143 if(lib) { |
144 dlclose(lib); | 144 dlclose(lib); |
145 | 145 |
146 /* compare handle pointers' high bits (in low 2 bits some flags might */ | 146 /* compare handle pointers' high bits (in low 2 bits some flags might */ |
147 /* be stored - should be safe b/c address needs alignment, anyways) */ | 147 /* be stored - should be safe b/c address needs alignment, anyways) */ |
148 if(((intptr_t)pLib ^ (intptr_t)lib) < 4) { | 148 if(((uintptr_t)pLib ^ (uintptr_t)lib) < 4) { |
149 l = dl_strlen_strcpy(sOut, libPath, bufSize); | 149 l = dl_strlen_strcpy(sOut, libPath, bufSize); |
150 break; | 150 break; |
151 } | 151 } |
152 } | 152 } |
153 } | 153 } |