Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-508

Can't compile, static and non-static b64 functions

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.1.0
    • Affects Version/s: 1.0.2
    • Component/s: None
    • None

      These 3 functions can't be static and non static at the same time:

      int b64_ntop (uint8_t const *src, size_t srclength, char *target, size_t targsize);
      void b64_initialize_rmap (void);
      int b64_pton (char const *src, uint8_t *target, size_t targsize);

      https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-b64-private.h#L29
      https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-b64-private.h#L35
      https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-b64-private.h#L38

      https://github.com/mongodb/libbson/blob/master/src/bson/b64_ntop.h#L116
      https://github.com/mongodb/libbson/blob/master/src/bson/b64_pton.h#L132
      https://github.com/mongodb/libbson/blob/master/src/bson/b64_pton.h#L161

      Please choose which one you prefer.

      By the way, you have 2 definitions of Assert(), Base64 and Pad64 (one in b64_ntop.h and one in b64_pton.h). It would be better to put them in the same file.

            Assignee:
            Unassigned Unassigned
            Reporter:
            samantha.ritter@mongodb.com Samantha Ritter (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: