Replace LPVOID with void*
authorJan Kotas <jkotas@microsoft.com>
Mon, 24 Oct 2016 14:59:16 +0000 (07:59 -0700)
committerJan Kotas <jkotas@microsoft.com>
Mon, 24 Oct 2016 14:59:16 +0000 (07:59 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/8ad166a44d54c2d9a9ef8b7629f361a05bb364dc

src/coreclr/src/inc/gcinfodecoder.h
src/coreclr/src/vm/gcinfodecoder.cpp

index dcf5f14..b31afb3 100644 (file)
@@ -112,7 +112,7 @@ inline BOOL IS_ALIGNED( void* val, size_t alignment )
 #ifndef _EETWAIN_H
 
 typedef void (*GCEnumCallback)(
-    LPVOID          hCallback,      // callback data
+    void *          hCallback,      // callback data
     OBJECTREF*      pObject,        // address of obect-reference we are reporting
     uint32_t        flags           // is this a pinned and/or interior pointer
 );
@@ -442,16 +442,16 @@ public:
     // This is used for gccoverage
     bool IsSafePoint(UINT32 codeOffset);
 
-    typedef void EnumerateSafePointsCallback (UINT32 offset, LPVOID hCallback);
-    void EnumerateSafePoints(EnumerateSafePointsCallback *pCallback, LPVOID hCallback);
+    typedef void EnumerateSafePointsCallback (UINT32 offset, void * hCallback);
+    void EnumerateSafePoints(EnumerateSafePointsCallback * pCallback, void * hCallback);
 
 #endif
     // Returns true to stop enumerating.
-    typedef bool EnumerateInterruptibleRangesCallback (UINT32 startOffset, UINT32 stopOffset, LPVOID hCallback);
+    typedef bool EnumerateInterruptibleRangesCallback (UINT32 startOffset, UINT32 stopOffset, void * hCallback);
 
     void EnumerateInterruptibleRanges (
                 EnumerateInterruptibleRangesCallback *pCallback,
-                LPVOID                                hCallback);
+                void *                                hCallback);
 
     //------------------------------------------------------------------------
     // GC lifetime information
@@ -462,7 +462,7 @@ public:
                 bool                reportScratchSlots,
                 unsigned            flags,
                 GCEnumCallback      pCallBack,
-                LPVOID              hCallBack
+                void *              hCallBack
                 );
 
     // Public for the gc info dumper
@@ -470,7 +470,7 @@ public:
                 PREGDISPLAY         pRD,
                 unsigned            flags,
                 GCEnumCallback      pCallBack,
-                LPVOID              hCallBack
+                void *              hCallBack
                 );
 
     //------------------------------------------------------------------------
@@ -539,7 +539,7 @@ private:
 #endif
     UINT32 m_Version;
 
-    static bool SetIsInterruptibleCB (UINT32 startOffset, UINT32 stopOffset, LPVOID hCallback);
+    static bool SetIsInterruptibleCB (UINT32 startOffset, UINT32 stopOffset, void * hCallback);
 
     OBJECTREF* GetRegisterSlot(
                         int             regNum,
@@ -571,7 +571,7 @@ private:
                 PREGDISPLAY         pRD,
                 unsigned            flags,
                 GCEnumCallback      pCallBack,
-                LPVOID              hCallBack
+                void *              hCallBack
                 );
 
     void ReportRegisterToGC(
@@ -580,7 +580,7 @@ private:
                                 PREGDISPLAY     pRD,
                                 unsigned        flags,
                                 GCEnumCallback  pCallBack,
-                                LPVOID          hCallBack
+                                void *          hCallBack
                                 );
 
     void ReportStackSlotToGC(
@@ -590,7 +590,7 @@ private:
                                 PREGDISPLAY     pRD,
                                 unsigned        flags,
                                 GCEnumCallback  pCallBack,
-                                LPVOID          hCallBack
+                                void *          hCallBack
                                 );
 
 
@@ -601,7 +601,7 @@ private:
                     bool                reportScratchSlots,
                     unsigned            inputFlags,
                     GCEnumCallback      pCallBack,
-                    LPVOID              hCallBack
+                    void *              hCallBack
                     )
     {
         _ASSERTE(slotIndex < slotDecoder.GetNumSlots());
index e660bf0..c49da86 100644 (file)
@@ -68,7 +68,7 @@
     }
 #endif // !LOG_PIPTR
 
-bool GcInfoDecoder::SetIsInterruptibleCB (UINT32 startOffset, UINT32 stopOffset, LPVOID hCallback)
+bool GcInfoDecoder::SetIsInterruptibleCB (UINT32 startOffset, UINT32 stopOffset, void * hCallback)
 {
     GcInfoDecoder *pThis = (GcInfoDecoder*)hCallback;
 
@@ -426,14 +426,14 @@ UINT32 GcInfoDecoder::FindSafePoint(UINT32 breakOffset)
     return result;
 }
 
-void GcInfoDecoder::EnumerateSafePoints(EnumerateSafePointsCallback *pCallback, LPVOID hCallback)
+void GcInfoDecoder::EnumerateSafePoints(EnumerateSafePointsCallback *pCallback, void * hCallback)
 {
     if(m_NumSafePoints == 0)
         return;
 
     const UINT32 numBitsPerOffset = CeilOfLog2(NORMALIZE_CODE_OFFSET(m_CodeLength));
 
-    for(UINT i = 0; i < m_NumSafePoints; i++)
+    for(UINT32 i = 0; i < m_NumSafePoints; i++)
     {
         UINT32 normOffset = (UINT32)m_Reader.Read(numBitsPerOffset);
         UINT32 offset = DENORMALIZE_CODE_OFFSET(normOffset) + 2;
@@ -450,7 +450,7 @@ void GcInfoDecoder::EnumerateSafePoints(EnumerateSafePointsCallback *pCallback,
 
 void GcInfoDecoder::EnumerateInterruptibleRanges (
             EnumerateInterruptibleRangesCallback *pCallback,
-            LPVOID                                hCallback)
+            void *                                hCallback)
 {
     // If no info is found for the call site, we default to fully-interruptbile
     LOG((LF_GCROOTS, LL_INFO1000000, "No GC info found for call site at offset %x. Defaulting to fully-interruptible information.\n", (int) m_InstructionOffset));
@@ -581,7 +581,7 @@ bool GcInfoDecoder::EnumerateLiveSlots(
                 bool                reportScratchSlots,
                 unsigned            inputFlags,
                 GCEnumCallback      pCallBack,
-                LPVOID              hCallBack
+                void *              hCallBack
                 )
 {
 
@@ -983,7 +983,7 @@ void GcInfoDecoder::EnumerateUntrackedSlots(
                 PREGDISPLAY         pRD,
                 unsigned            inputFlags,
                 GCEnumCallback      pCallBack,
-                LPVOID              hCallBack
+                void *              hCallBack
                 )
 {
     _ASSERTE(GC_SLOT_INTERIOR == GC_CALL_INTERIOR);
@@ -1017,7 +1017,7 @@ void GcInfoDecoder::ReportUntrackedSlots(
                 PREGDISPLAY         pRD,
                 unsigned            inputFlags,
                 GCEnumCallback      pCallBack,
-                LPVOID              hCallBack
+                void *              hCallBack
                 )
 {
     for(UINT32 slotIndex = slotDecoder.GetNumTracked(); slotIndex < slotDecoder.GetNumSlots(); slotIndex++)
@@ -1428,7 +1428,7 @@ void GcInfoDecoder::ReportRegisterToGC(  // AMD64
                                 PREGDISPLAY     pRD,
                                 unsigned        flags,
                                 GCEnumCallback  pCallBack,
-                                LPVOID          hCallBack)
+                                void *          hCallBack)
 {
     GCINFODECODER_CONTRACT;
 
@@ -1562,7 +1562,7 @@ void GcInfoDecoder::ReportRegisterToGC(  // ARM
                                 PREGDISPLAY     pRD,
                                 unsigned        flags,
                                 GCEnumCallback  pCallBack,
-                                LPVOID          hCallBack)
+                                void *          hCallBack)
 {
     GCINFODECODER_CONTRACT;
 
@@ -1653,7 +1653,7 @@ void GcInfoDecoder::ReportRegisterToGC( // ARM64
                                 PREGDISPLAY     pRD,
                                 unsigned        flags,
                                 GCEnumCallback  pCallBack,
-                                LPVOID          hCallBack)
+                                void *          hCallBack)
 {
     GCINFODECODER_CONTRACT;
 
@@ -1731,7 +1731,7 @@ void GcInfoDecoder::ReportRegisterToGC(
                                 PREGDISPLAY     pRD,
                                 unsigned        flags,
                                 GCEnumCallback  pCallBack,
-                                LPVOID          hCallBack)
+                                void *          hCallBack)
 {
     _ASSERTE( !"NYI" );
 }
@@ -1810,7 +1810,7 @@ void GcInfoDecoder::ReportStackSlotToGC(
                                 PREGDISPLAY     pRD,
                                 unsigned        flags,
                                 GCEnumCallback  pCallBack,
-                                LPVOID          hCallBack)
+                                void *          hCallBack)
 {
     GCINFODECODER_CONTRACT;