[Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.24,2.25

Tim Peters python-dev@python.org
Tue, 09 Jan 2001 21:42:20 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv31016/python/dist/src/modules

Modified Files:
	mmapmodule.c 
Log Message:
Windows mmap should (as the docs probably <wink> say) create a mapping
without a name when the optional tagname arg isn't specified.  Was
actually creating a mapping with an empty string as the name.


Index: mmapmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v
retrieving revision 2.24
retrieving revision 2.25
diff -C2 -r2.24 -r2.25
*** mmapmodule.c	2000/10/01 17:50:46	2.24
--- mmapmodule.c	2001/01/10 05:42:18	2.25
***************
*** 908,912 ****
  
  	/* set the tag name */
! 	if (tagname != NULL) {
  		m_obj->tagname = PyMem_Malloc(strlen(tagname)+1);
  		if (m_obj->tagname == NULL) {
--- 908,912 ----
  
  	/* set the tag name */
! 	if (tagname != NULL && *tagname != '\0') {
  		m_obj->tagname = PyMem_Malloc(strlen(tagname)+1);
  		if (m_obj->tagname == NULL) {
***************
*** 925,929 ****
  					       0,
  					       m_obj->size,
! 					       tagname);
  	if (m_obj->map_handle != NULL) {
  		m_obj->data = (char *) MapViewOfFile (m_obj->map_handle,
--- 925,929 ----
  					       0,
  					       m_obj->size,
! 					       m_obj->tagname);
  	if (m_obj->map_handle != NULL) {
  		m_obj->data = (char *) MapViewOfFile (m_obj->map_handle,