Skip to content

Commit 98a1e7e

Browse files
committed
Cleanup
1 parent d990a59 commit 98a1e7e

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

include/deemon/object.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -564,21 +564,21 @@ typedef NONNULL_T((1)) void (DCALL *Dee_visit_t)(DeeObject *__restrict self, voi
564564
#define Dee_Visit(ob) (*proc)(Dee_AsObject(ob), arg)
565565
#define Dee_XVisit(ob) (void)(!(ob) || (Dee_Visit(ob), 0))
566566

567-
#define Dee_Visitv(object_vector, object_count) \
568-
do { \
569-
size_t _dvv_i; \
570-
for (_dvv_i = 0; _dvv_i < (size_t)(object_count); ++_dvv_i) { \
567+
#define Dee_Visitv(object_vector, object_count) \
568+
do { \
569+
size_t _dvv_i; \
570+
for (_dvv_i = 0; _dvv_i < (size_t)(object_count); ++_dvv_i) { \
571571
DeeObject *_dvv_ob = Dee_AsObject((object_vector)[_dvv_i]); \
572-
Dee_Visit(_dvv_ob); \
573-
} \
572+
Dee_Visit(_dvv_ob); \
573+
} \
574574
} __WHILE0
575-
#define Dee_XVisitv(object_vector, object_count) \
576-
do { \
577-
size_t _dvv_i; \
578-
for (_dvv_i = 0; _dvv_i < (size_t)(object_count); ++_dvv_i) { \
575+
#define Dee_XVisitv(object_vector, object_count) \
576+
do { \
577+
size_t _dvv_i; \
578+
for (_dvv_i = 0; _dvv_i < (size_t)(object_count); ++_dvv_i) { \
579579
DeeObject *_dvv_ob = Dee_AsObject((object_vector)[_dvv_i]); \
580-
Dee_XVisit(_dvv_ob); \
581-
} \
580+
Dee_XVisit(_dvv_ob); \
581+
} \
582582
} __WHILE0
583583

584584

src/deemon/execute/modpath.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,29 +220,37 @@ FS_DeeString_LessSTR(DeeStringObject *lhs,
220220
#undef Dee_DEXBOUNDS_USE__xdlmodule_info /* KOSmk3: xdlmodule_info */
221221

222222
#ifdef DeeSystem_DlOpen_USE_LoadLibrary
223+
223224
#ifdef CONFIG_HOST_WINDOWS
224225
#define Dee_DEXBOUNDS_USE__GetModuleInformation
225226
#define Dee_DEXATADDR_USE__GetModuleHandleExW
226227
#endif /* CONFIG_HOST_WINDOWS */
228+
227229
#elif defined(DeeSystem_DlOpen_USE_dlopen)
230+
228231
#ifdef CONFIG_HAVE_dl_iterate_phdr
229232
#if defined(CONFIG_HAVE_dladdr1__RTLD_DL_LINKMAP) && defined(CONFIG_HAVE_struct__link_map__l_addr)
230233
#define Dee_DEXBOUNDS_USE__dl_iterate_phdr__AND__dladdr1__RTLD_DL_LINKMAP
231234
#endif /* CONFIG_HAVE_dladdr1__RTLD_DL_LINKMAP && CONFIG_HAVE_struct__link_map__l_addr */
232235
#define Dee_DEXBOUNDS_USE__dl_iterate_phdr
233236
#endif /* CONFIG_HAVE_dl_iterate_phdr */
237+
234238
#if defined(__KOS_VERSION__) && (__KOS_VERSION__ >= 300 && __KOS_VERSION__ < 400)
235239
#define Dee_DEXBOUNDS_USE__xdlmodule_info
236240
#endif /* __KOS_VERSION__ >= 300 && __KOS_VERSION__ < 400 */
241+
237242
#ifdef CONFIG_HAVE_dlgethandle
238243
#define Dee_DEXATADDR_USE__dlgethandle
239244
#endif /* CONFIG_HAVE_dlgethandle */
245+
240246
#ifdef CONFIG_HAVE_dladdr1__RTLD_DL_LINKMAP
241247
#define Dee_DEXATADDR_USE__dladdr1__RTLD_DL_LINKMAP
242248
#endif /* CONFIG_HAVE_dladdr1__RTLD_DL_LINKMAP */
249+
243250
#ifdef CONFIG_HAVE_dladdr
244251
#define Dee_DEXATADDR_USE__dladdr__dli_fname
245252
#endif /* CONFIG_HAVE_dladdr */
253+
246254
#endif /* ... */
247255

248256

src/deemon/system/system.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2051,11 +2051,11 @@ DeeMapFile_InitSysFd(struct DeeMapFile *__restrict self, Dee_fd_t fd,
20512051
/* NOTE: This right here doesn't work in all cases, mainly due to
20522052
* the fact that the `VirtualAlloc()' below fails if passed
20532053
* a base address that isn't a multiple of 0x10000 (and we
2054-
* need it to work if it's a multiple of 0x1000). Also, there
2055-
* can be the case where `VirtualAlloc()' fails because the
2056-
* relevant address is already mapped.
2054+
* need it to work if it isn't a multiple of 0x1000). Also,
2055+
* there can be the case where `VirtualAlloc()' fails because
2056+
* the relevant address is already mapped.
20572057
*/
2058-
hMap = CreateFileMappingA(fd, NULL,
2058+
hMap = CreateFileMappingW(fd, NULL,
20592059
(flags & DEE_MAPFILE_F_MAPSHARED)
20602060
? PAGE_READWRITE
20612061
: PAGE_WRITECOPY,

0 commit comments

Comments
 (0)