A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-checkins/2002-October/029901.html below:

[Python-checkins] python/dist/src/Python compile.c,2.263,2.264

[Python-checkins] python/dist/src/Python compile.c,2.263,2.264mwh@users.sourceforge.net mwh@users.sourceforge.net
Thu, 03 Oct 2002 02:50:49 -0700
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv607/Python

Modified Files:
	compile.c 
Log Message:
Clamp code objects' tp_compare result to [-1, 1].

Bugfix candidate.



Index: compile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v
retrieving revision 2.263
retrieving revision 2.264
diff -C2 -d -r2.263 -r2.264
*** compile.c	30 Aug 2002 13:09:51 -0000	2.263
--- compile.c	3 Oct 2002 09:50:47 -0000	2.264
***************
*** 197,205 ****
  	if (cmp) return cmp;
  	cmp = co->co_argcount - cp->co_argcount;
! 	if (cmp) return cmp;
  	cmp = co->co_nlocals - cp->co_nlocals;
! 	if (cmp) return cmp;
  	cmp = co->co_flags - cp->co_flags;
! 	if (cmp) return cmp;
  	cmp = PyObject_Compare(co->co_code, cp->co_code);
  	if (cmp) return cmp;
--- 197,205 ----
  	if (cmp) return cmp;
  	cmp = co->co_argcount - cp->co_argcount;
! 	if (cmp) return (cmp<0)?-1:1;
  	cmp = co->co_nlocals - cp->co_nlocals;
! 	if (cmp) return (cmp<0)?-1:1;
  	cmp = co->co_flags - cp->co_flags;
! 	if (cmp) return (cmp<0)?-1:1;
  	cmp = PyObject_Compare(co->co_code, cp->co_code);
  	if (cmp) return cmp;





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4