[Python-checkins] python/dist/src/Objects typeobject.c, 2.157.2.1,
2.157.2.2
nnorwitz at users.sourceforge.net
nnorwitz at users.sourceforge.net
Sat Mar 20 14:46:54 EST 2004
Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15883/Objects
Modified Files:
Tag: ast-branch
typeobject.c
Log Message:
get name mangling working
Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.157.2.1
retrieving revision 2.157.2.2
diff -C2 -d -r2.157.2.1 -r2.157.2.2
*** typeobject.c 28 Apr 2003 17:18:04 -0000 2.157.2.1
--- typeobject.c 20 Mar 2004 19:46:51 -0000 2.157.2.2
***************
*** 1700,1704 ****
for (i = j = 0; i < nslots; i++) {
char *s;
- char buffer[256];
tmp = PyTuple_GET_ITEM(slots, i);
s = PyString_AS_STRING(tmp);
--- 1700,1703 ----
***************
*** 1706,1717 ****
(add_weak && strcmp(s, "__weakref__") == 0))
continue;
! if (_Py_Mangle(PyString_AS_STRING(name),
! PyString_AS_STRING(tmp),
! buffer, sizeof(buffer)))
! {
! tmp = PyString_FromString(buffer);
! } else {
! Py_INCREF(tmp);
! }
PyTuple_SET_ITEM(newslots, j, tmp);
j++;
--- 1705,1711 ----
(add_weak && strcmp(s, "__weakref__") == 0))
continue;
! tmp =_Py_Mangle(name, tmp);
! if (!tmp)
! goto bad_slots;
PyTuple_SET_ITEM(newslots, j, tmp);
j++;
More information about the Python-checkins
mailing list