VirtualBox

Changeset 46270 in vbox for trunk/include/iprt


Ignore:
Timestamp:
May 26, 2013 3:34:28 PM (12 years ago)
Author:
vboxsync
Message:

iprt/types.h: Extended the pointer unions (RTPTRUNION, RTCPTRUNION, RTVPTRUNION, and RTCVPTRUNION) with some classing C types.

File:
1 edited

Legend:

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

    r45724 r46270  
    736736{
    737737    /** Pointer into the void... */
    738     void               *pv;
     738    void                   *pv;
     739    /** Pointer to char value. */
     740    char                   *pch;
     741    /** Pointer to char value. */
     742    unsigned char          *puch;
     743    /** Pointer to a int value. */
     744    int                    *pi;
     745    /** Pointer to a unsigned int value. */
     746    unsigned int           *pu;
     747    /** Pointer to a long value. */
     748    long                   *pl;
     749    /** Pointer to a long value. */
     750    unsigned long          *pul;
    739751    /** Pointer to a 8-bit unsigned value. */
    740     uint8_t            *pu8;
     752    uint8_t                *pu8;
    741753    /** Pointer to a 16-bit unsigned value. */
    742     uint16_t           *pu16;
     754    uint16_t               *pu16;
    743755    /** Pointer to a 32-bit unsigned value. */
    744     uint32_t           *pu32;
     756    uint32_t               *pu32;
    745757    /** Pointer to a 64-bit unsigned value. */
    746     uint64_t           *pu64;
     758    uint64_t               *pu64;
    747759} RTPTRUNION;
    748760/** Pointer to a pointer union. */
     
    755767{
    756768    /** Pointer into the void... */
    757     void const         *pv;
     769    void const             *pv;
     770    /** Pointer to char value. */
     771    char const             *pch;
     772    /** Pointer to char value. */
     773    unsigned char const    *puch;
     774    /** Pointer to a int value. */
     775    int const              *pi;
     776    /** Pointer to a unsigned int value. */
     777    unsigned int const     *pu;
     778    /** Pointer to a long value. */
     779    long const             *pl;
     780    /** Pointer to a long value. */
     781    unsigned long const    *pul;
    758782    /** Pointer to a 8-bit unsigned value. */
    759     uint8_t const      *pu8;
     783    uint8_t const          *pu8;
    760784    /** Pointer to a 16-bit unsigned value. */
    761     uint16_t const     *pu16;
     785    uint16_t const         *pu16;
    762786    /** Pointer to a 32-bit unsigned value. */
    763     uint32_t const     *pu32;
     787    uint32_t const         *pu32;
    764788    /** Pointer to a 64-bit unsigned value. */
    765     uint64_t const     *pu64;
     789    uint64_t const         *pu64;
    766790} RTCPTRUNION;
    767791/** Pointer to a const pointer union. */
     
    774798{
    775799    /** Pointer into the void... */
    776     void volatile      *pv;
     800    void volatile          *pv;
     801    /** Pointer to char value. */
     802    char volatile          *pch;
     803    /** Pointer to char value. */
     804    unsigned char volatile *puch;
     805    /** Pointer to a int value. */
     806    int volatile           *pi;
     807    /** Pointer to a unsigned int value. */
     808    unsigned int volatile  *pu;
     809    /** Pointer to a long value. */
     810    long volatile          *pl;
     811    /** Pointer to a long value. */
     812    unsigned long volatile *pul;
    777813    /** Pointer to a 8-bit unsigned value. */
    778     uint8_t volatile   *pu8;
     814    uint8_t volatile       *pu8;
    779815    /** Pointer to a 16-bit unsigned value. */
    780     uint16_t volatile  *pu16;
     816    uint16_t volatile      *pu16;
    781817    /** Pointer to a 32-bit unsigned value. */
    782     uint32_t volatile  *pu32;
     818    uint32_t volatile      *pu32;
    783819    /** Pointer to a 64-bit unsigned value. */
    784     uint64_t volatile  *pu64;
     820    uint64_t volatile      *pu64;
    785821} RTVPTRUNION;
    786822/** Pointer to a const pointer union. */
     
    793829{
    794830    /** Pointer into the void... */
    795     void const volatile        *pv;
     831    void const volatile            *pv;
     832    /** Pointer to char value. */
     833    char const volatile            *pch;
     834    /** Pointer to char value. */
     835    unsigned char const volatile   *puch;
     836    /** Pointer to a int value. */
     837    int const volatile             *pi;
     838    /** Pointer to a unsigned int value. */
     839    unsigned int const volatile    *pu;
     840    /** Pointer to a long value. */
     841    long const volatile            *pl;
     842    /** Pointer to a long value. */
     843    unsigned long const volatile   *pul;
    796844    /** Pointer to a 8-bit unsigned value. */
    797     uint8_t const volatile     *pu8;
     845    uint8_t const volatile         *pu8;
    798846    /** Pointer to a 16-bit unsigned value. */
    799     uint16_t const volatile    *pu16;
     847    uint16_t const volatile        *pu16;
    800848    /** Pointer to a 32-bit unsigned value. */
    801     uint32_t const volatile    *pu32;
     849    uint32_t const volatile        *pu32;
    802850    /** Pointer to a 64-bit unsigned value. */
    803     uint64_t const volatile    *pu64;
     851    uint64_t const volatile        *pu64;
    804852} RTCVPTRUNION;
    805853/** Pointer to a const pointer union. */
Note: See TracChangeset for help on using the changeset viewer.

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