INNER CODE UNIT · C

element_len

mongodb/mongo-php-driver · src/phongo_bson.c:112

		element_len = strlen(field_path->elements[i]);

		/* Assert that we have enough space in the buffer for this element plus separator */
		BSON_ASSERT((size_t) (ptr - path) + element_len + 1 < length);

		strcpy(ptr, field_path->elements[i]);
		ptr += element_len;
		ptr[0] = '.';
		ptr++;
	}

	if (ptr == path) {
		path[0] = '\0';
	} else {
		ptr[-1] = '\0';
	}

	return path;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…