VirtualBox

Changeset 36890 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Apr 29, 2011 1:21:12 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
71468
Message:

iprt/types.h: Made the NIL_RTRxPTR defines work nicely in all contexts as NULL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/types.h

    r36573 r36890  
    10721072
    10731073/** HC ring-3 pointer. */
    1074 #ifdef  IN_RING3
     1074#ifdef IN_RING3
    10751075typedef void *              RTR3PTR;
    10761076#else
     
    10841084 * NIL HC ring-3 pointer.
    10851085 */
    1086 #define NIL_RTR3PTR         ((RTR3PTR)0)
     1086#ifndef IN_RING3
     1087# define NIL_RTR3PTR        ((RTR3PTR)0)
     1088#else
     1089# define NIL_RTR3PTR        (NULL)
     1090#endif
    10871091/** Max RTR3PTR value. */
    10881092#define RTR3PTR_MAX         ((RTR3PTR)RTR3UINTPTR_MAX)
     
    11011105 * NIL HC ring-0 pointer.
    11021106 */
    1103 #define NIL_RTR0PTR         ((RTR0PTR)0)
     1107#ifndef IN_RING0
     1108# define NIL_RTR0PTR        ((RTR0PTR)0)
     1109#else
     1110# define NIL_RTR0PTR        (NULL)
     1111#endif
    11041112/** Max RTR3PTR value. */
    11051113#define RTR0PTR_MAX         ((RTR0PTR)RTR0UINTPTR_MAX)
     
    13711379 * NIL RC pointer.
    13721380 */
    1373 #define NIL_RTRCPTR    ((RTRCPTR)0)
     1381#ifndef IN_RC
     1382# define NIL_RTRCPTR   ((RTRCPTR)0)
     1383#else
     1384# define NIL_RTRCPTR   (NULL)
     1385#endif
    13741386/** @def RTRCPTR_MAX
    13751387 * The maximum value a RTRCPTR can have. Mostly used as INVALID value.
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette