[Python-checkins] CVS: python/dist/src/Modules _sre.c,2.54,2.55
Fredrik Lundh
effbot@users.sourceforge.net
Sun, 15 Apr 2001 12:01:01 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv14779/Modules
Modified Files:
_sre.c
Log Message:
SRE: made "copyright" string static, to avoid potential linking
conflicts.
Index: _sre.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v
retrieving revision 2.54
retrieving revision 2.55
diff -C2 -r2.54 -r2.55
*** _sre.c 2001/03/22 15:50:09 2.54
--- _sre.c 2001/04/15 19:00:58 2.55
***************
*** 28,31 ****
--- 28,32 ----
* 2001-01-16 fl fixed memory leak in pattern destructor
* 2001-03-20 fl lots of fixes for 2.1b2
+ * 2001-04-15 fl export copyright as Python attribute, not global
*
* Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved.
***************
*** 42,46 ****
#ifndef SRE_RECURSIVE
! char copyright[] = " SRE 2.1b2 Copyright (c) 1997-2001 by Secret Labs AB ";
#include "Python.h"
--- 43,48 ----
#ifndef SRE_RECURSIVE
! static char copyright[] =
! " SRE 2.1b2 Copyright (c) 1997-2001 by Secret Labs AB ";
#include "Python.h"
***************
*** 2428,2431 ****
--- 2430,2438 ----
d, "MAGIC", (PyObject*) PyInt_FromLong(SRE_MAGIC)
);
+
+ PyDict_SetItemString(
+ d, "copyright", (PyObject*) PyString_FromString(copyright)
+ );
+
}