[Python-checkins] CVS: python/dist/src/Parser grammar1.c,2.15,2.16

Tim Peters tim_one@users.sourceforge.net
2001年12月03日 19:36:03 -0800


Update of /cvsroot/python/python/dist/src/Parser
In directory usw-pr-cvs1:/tmp/cvs-serv1202/python/Parser
Modified Files:
	grammar1.c 
Log Message:
PyGrammar_LabelRepr(): sprintf -> PyOS_snprintf.
Index: grammar1.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Parser/grammar1.c,v
retrieving revision 2.15
retrieving revision 2.16
diff -C2 -d -r2.15 -r2.16
*** grammar1.c	2001年12月04日 03:18:48	2.15
--- grammar1.c	2001年12月04日 03:36:01	2.16
***************
*** 40,44 ****
 	else if (ISNONTERMINAL(lb->lb_type)) {
 		if (lb->lb_str == NULL) {
! 			sprintf(buf, "NT%d", lb->lb_type);
 			return buf;
 		}
--- 40,44 ----
 	else if (ISNONTERMINAL(lb->lb_type)) {
 		if (lb->lb_str == NULL) {
! 			PyOS_snprintf(buf, sizeof(buf), "NT%d", lb->lb_type);
 			return buf;
 		}
***************
*** 50,54 ****
 			return _PyParser_TokenNames[lb->lb_type];
 		else {
! 			sprintf(buf, "%.32s(%.32s)",
 				_PyParser_TokenNames[lb->lb_type], lb->lb_str);
 			return buf;
--- 50,54 ----
 			return _PyParser_TokenNames[lb->lb_type];
 		else {
! 			PyOS_snprintf(buf, sizeof(buf), "%.32s(%.32s)",
 				_PyParser_TokenNames[lb->lb_type], lb->lb_str);
 			return buf;

AltStyle によって変換されたページ (->オリジナル) /