without a name when the optional tagname arg isn't specified. Was
actually creating a mapping with an empty string as the name.
m_obj->pos = (size_t) 0;
/* set the tag name */
- if (tagname != NULL) {
+ if (tagname != NULL && *tagname != '\0') {
m_obj->tagname = PyMem_Malloc(strlen(tagname)+1);
if (m_obj->tagname == NULL) {
PyErr_NoMemory();
PAGE_READWRITE,
0,
m_obj->size,
- tagname);
+ m_obj->tagname);
if (m_obj->map_handle != NULL) {
m_obj->data = (char *) MapViewOfFile (m_obj->map_handle,
FILE_MAP_WRITE,