Skip to content

CDRIVER-5901 support auto encryption in unified tests #2004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
3 changes: 3 additions & 0 deletions src/libmongoc/src/mongoc/mongoc-util-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ mongoc_ends_with (const char *str, const char *suffix);
void
mongoc_lowercase (const char *src, char *buf /* OUT */);

void
mongoc_lowercase_inplace (char *src);

bool
mongoc_parse_port (uint16_t *port, const char *str);

Expand Down
12 changes: 12 additions & 0 deletions src/libmongoc/src/mongoc/mongoc-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,18 @@ mongoc_lowercase (const char *src, char *buf /* OUT */)
}
}

void
mongoc_lowercase_inplace (char *src)
{
for (; *src; ++src) {
/* UTF8 non-ascii characters have a 1 at the leftmost bit. If this is the
* case, just copy */
if ((*src & (0x1 << 7)) == 0) {
*src = (char) tolower (*src);
}
}
}

bool
mongoc_parse_port (uint16_t *port, const char *str)
{
Expand Down

This file was deleted.

Loading