[Python-checkins] CVS: python/dist/src/Modules getpath.c,1.22,1.23

Guido van Rossum python-dev@python.org
Wed, 28 Jun 2000 14:29:05 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv3939

Modified Files:
	getpath.c 
Log Message:
Trent Mick: use size_t instead of int where appropriate (various spots).



Index: getpath.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/getpath.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** getpath.c	2000/05/26 21:49:07	1.22
--- getpath.c	2000/06/28 21:29:03	1.23
***************
*** 164,168 ****
  	char *dir;
  {
! 	int i = strlen(dir);
  	while (i > 0 && dir[i] != SEP)
  		--i;
--- 164,168 ----
  	char *dir;
  {
! 	size_t i = strlen(dir);
  	while (i > 0 && dir[i] != SEP)
  		--i;
***************
*** 242,246 ****
  	char *stuff;
  {
! 	int n, k;
  	if (stuff[0] == SEP)
  		n = 0;
--- 242,246 ----
  	char *stuff;
  {
! 	size_t n, k;
  	if (stuff[0] == SEP)
  		n = 0;
***************
*** 263,267 ****
  	char *home;
  {
! 	int n;
  	char *vpath;
  
--- 263,267 ----
  	char *home;
  {
! 	size_t n;
  	char *vpath;
  
***************
*** 332,336 ****
  	char *home;
  {
! 	int n;
  
  	/* If PYTHONHOME is set, we believe it unconditionally */
--- 332,336 ----
  	char *home;
  {
! 	size_t n;
  
  	/* If PYTHONHOME is set, we believe it unconditionally */
***************
*** 394,399 ****
  	int pfound, efound; /* 1 if found; -1 if found build directory */
  	char *buf;
! 	int bufsz;
! 	int prefixsz;
  	char *defpath = pythonpath;
  #ifdef WITH_NEXT_FRAMEWORK
--- 394,399 ----
  	int pfound, efound; /* 1 if found; -1 if found build directory */
  	char *buf;
! 	size_t bufsz;
! 	size_t prefixsz;
  	char *defpath = pythonpath;
  #ifdef WITH_NEXT_FRAMEWORK
***************
*** 430,434 ****
  
  			if (delim) {
! 				int len = delim - path;
  				strncpy(progpath, path, len);
  				*(progpath + len) = '\0';
--- 430,434 ----
  
  			if (delim) {
! 				size_t len = delim - path;
  				strncpy(progpath, path, len);
  				*(progpath + len) = '\0';
***************
*** 558,563 ****
  
  			if (delim) {
! 				int len = delim - defpath + 1;
! 				int end = strlen(buf) + len;
  				strncat(buf, defpath, len);
  				*(buf + end) = '\0';
--- 558,563 ----
  
  			if (delim) {
! 				size_t len = delim - defpath + 1;
! 				size_t end = strlen(buf) + len;
  				strncat(buf, defpath, len);
  				*(buf + end) = '\0';