Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-99

Porting Issue -- pn_dtag macro does not compile with Visual Studio compiler

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • proton-0.4
    • proton-c
    • Windows using Visual Studio 2010

    Description

      I would like to replace the pn_dtag macro with a function that will compile using either GNU or Visual Studio compilers.

      engine.h
      Replace:
      #define pn_dtag(BYTES, SIZE) ((pn_delivery_tag_t)

      {(SIZE), (BYTES)}

      With:
      pn_delivery_tag_t pn_dtag(const char *bytes, size_t size);

      engine.c
      Add:

      pn_delivery_tag_t pn_dtag(const char *bytes, size_t size)
      {
      pn_delivery_tag_t delivt;
      delivt.bytes = bytes;
      delivt.size = size;
      return delivt;
      }

      Attachments

        1. pn_dtag.patch
          1 kB
          Mary hinton

        Activity

          People

            cliffjansen Clifford Jansen
            marydhinton Mary hinton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: