Zebediah Figura : include: Rename InMemoryOrderModuleList to InMemoryOrderLinks.

Alexandre Julliard julliard at winehq.org
Fri Apr 24 15:11:38 CDT 2020


Module: wine
Branch: master
Commit: 4b3e820e07e3ca00411d8cc5fcb13e7a94a4c494
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4b3e820e07e3ca00411d8cc5fcb13e7a94a4c494

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu Apr 23 20:17:32 2020 -0500

include: Rename InMemoryOrderModuleList to InMemoryOrderLinks.

To match Microsoft's public definition.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/tests/loader.c |  2 +-
 dlls/ntdll/loader.c          | 18 +++++++++---------
 dlls/ntdll/tests/rtl.c       |  6 +++---
 include/winternl.h           |  2 +-
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index 89496ac7e8..2164440494 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -3816,7 +3816,7 @@ static void test_InMemoryOrderModuleList(void)
          entry1 = entry1->Flink, entry2 = entry2->Flink)
     {
         module1 = CONTAINING_RECORD(entry1, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList);
-        module2 = CONTAINING_RECORD(entry2, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList);
+        module2 = CONTAINING_RECORD(entry2, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
         ok(module1 == module2, "expected module1 == module2, got %p and %p\n", module1, module2);
     }
     ok(entry1 == mark1, "expected entry1 == mark1, got %p and %p\n", entry1, mark1);
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 8f60fd1043..22843706db 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -478,7 +478,7 @@ static WINE_MODREF *get_modref( HMODULE hmod )
     mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
     for (entry = mark->Flink; entry != mark; entry = entry->Flink)
     {
-        mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList);
+        mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
         if (mod->BaseAddress == hmod)
             return cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
     }
@@ -1226,7 +1226,7 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
     InsertTailList(&NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList,
                    &wm->ldr.InLoadOrderModuleList);
     InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
-                   &wm->ldr.InMemoryOrderModuleList);
+                   &wm->ldr.InMemoryOrderLinks);
     /* wait until init is called for inserting into InInitializationOrderModuleList */
 
     if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
@@ -1638,7 +1638,7 @@ NTSTATUS WINAPI LdrFindEntryForAddress( const void *addr, PLDR_DATA_TABLE_ENTRY
     mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
     for (entry = mark->Flink; entry != mark; entry = entry->Flink)
     {
-        mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList);
+        mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
         if (mod->BaseAddress <= addr &&
             (const char *)addr < (char*)mod->BaseAddress + mod->SizeOfImage)
         {
@@ -1668,7 +1668,7 @@ NTSTATUS WINAPI LdrEnumerateLoadedModules( void *unknown, LDRENUMPROC callback,
     mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
     for (entry = mark->Flink; entry != mark; entry = entry->Flink)
     {
-        mod = CONTAINING_RECORD( entry, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList );
+        mod = CONTAINING_RECORD( entry, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks );
         callback( mod, context, &stop );
         if (stop) break;
     }
@@ -2029,7 +2029,7 @@ static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRIN
         {
             /* the module has only been inserted in the load & memory order lists */
             RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
-            RemoveEntryList(&wm->ldr.InMemoryOrderModuleList);
+            RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
             /* FIXME: free the modref */
             return status;
         }
@@ -2572,7 +2572,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam
         {
             /* the module has only be inserted in the load & memory order lists */
             RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
-            RemoveEntryList(&wm->ldr.InMemoryOrderModuleList);
+            RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
 
             /* FIXME: there are several more dangling references
              * left. Including dlls loaded by this dll before the
@@ -3790,7 +3790,7 @@ void WINAPI LdrShutdownThread(void)
 static void free_modref( WINE_MODREF *wm )
 {
     RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
-    RemoveEntryList(&wm->ldr.InMemoryOrderModuleList);
+    RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
     if (wm->ldr.InInitializationOrderModuleList.Flink)
         RemoveEntryList(&wm->ldr.InInitializationOrderModuleList);
 
@@ -4578,8 +4578,8 @@ void __wine_process_init(void)
     /* the main exe needs to be the first in the load order list */
     RemoveEntryList( &wm->ldr.InLoadOrderModuleList );
     InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderModuleList );
-    RemoveEntryList( &wm->ldr.InMemoryOrderModuleList );
-    InsertHeadList( &peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderModuleList );
+    RemoveEntryList( &wm->ldr.InMemoryOrderLinks );
+    InsertHeadList( &peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderLinks );
 
     virtual_alloc_thread_stack( &stack, 0, 0, NULL );
     teb->Tib.StackBase = stack.StackBase;
diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c
index b8e30bd947..f29eca24f0 100644
--- a/dlls/ntdll/tests/rtl.c
+++ b/dlls/ntdll/tests/rtl.c
@@ -3455,7 +3455,7 @@ static void CALLBACK ldr_notify_callback1(ULONG reason, LDR_DLL_NOTIFICATION_DAT
 
     /* expect module to be last module listed in LdrData load order list */
     mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
-    mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList);
+    mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
     ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n",
        data->Loaded.DllBase, mod->BaseAddress);
     ok(!lstrcmpiW(mod->BaseDllName.Buffer, expected_dll), "Expected %s, got %s\n",
@@ -3516,7 +3516,7 @@ static void CALLBACK ldr_notify_callback_dll_main(ULONG reason, LDR_DLL_NOTIFICA
         return;
 
     mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
-    mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList);
+    mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
     ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n",
        data->Loaded.DllBase, mod->BaseAddress);
     if (mod->BaseAddress != data->Loaded.DllBase)
@@ -3555,7 +3555,7 @@ static void CALLBACK ldr_notify_callback_fail(ULONG reason, LDR_DLL_NOTIFICATION
         return;
 
     mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList;
-    mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderModuleList);
+    mod = CONTAINING_RECORD(mark->Blink, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
     ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n",
        data->Loaded.DllBase, mod->BaseAddress);
     if (mod->BaseAddress != data->Loaded.DllBase)
diff --git a/include/winternl.h b/include/winternl.h
index 0fa5485596..b246871f07 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2320,7 +2320,7 @@ typedef enum _LDR_DLL_LOAD_REASON
 typedef struct _LDR_DATA_TABLE_ENTRY
 {
     LIST_ENTRY          InLoadOrderModuleList;
-    LIST_ENTRY          InMemoryOrderModuleList;
+    LIST_ENTRY          InMemoryOrderLinks;
     LIST_ENTRY          InInitializationOrderModuleList;
     void*               BaseAddress;
     void*               EntryPoint;




More information about the wine-cvs mailing list