diff options
author | perky <perky@FreeBSD.org> | 2004-02-09 17:54:07 +0800 |
---|---|---|
committer | perky <perky@FreeBSD.org> | 2004-02-09 17:54:07 +0800 |
commit | 797da00177b7bf028787c09cf86bb871f27e62bf (patch) | |
tree | c933a91155572a7813b0ff3c0ee3d55fb4405675 /lang/python | |
parent | 61a3105e2098de582b4adcffc38f913f82cb6f60 (diff) | |
download | freebsd-ports-graphics-797da00177b7bf028787c09cf86bb871f27e62bf.tar.gz freebsd-ports-graphics-797da00177b7bf028787c09cf86bb871f27e62bf.tar.zst freebsd-ports-graphics-797da00177b7bf028787c09cf86bb871f27e62bf.zip |
- Use process scope threads instead of system scope to enable large
amount of threads on -CURRENT libpthread by default. [1]
- Merge bugfixes from python 2.3 maintenance branch: [2]
o weakref object's garbage collection problem.
o save unnecessary startup-time memory allocation of 100KB+ from
intobject.
- SIZEify.
- Bump PORTREVISION subsequently.
Advised by: eischen, julian [1]
Obtained from: Python CVS [2]
Diffstat (limited to 'lang/python')
-rw-r--r-- | lang/python/Makefile | 1 | ||||
-rw-r--r-- | lang/python/distinfo | 1 | ||||
-rw-r--r-- | lang/python/files/patch-Objects::intobject.c | 12 | ||||
-rw-r--r-- | lang/python/files/patch-Objects::weakrefobject.c | 65 | ||||
-rw-r--r-- | lang/python/files/patch-configure | 27 |
5 files changed, 97 insertions, 9 deletions
diff --git a/lang/python/Makefile b/lang/python/Makefile index 1f4bb8f039f..f1e5839bdd2 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -7,6 +7,7 @@ PORTNAME= python PORTVERSION= 2.3.3 +PORTREVISION= 1 CATEGORIES= lang python ipv6 MASTER_SITES= ${PYTHON_MASTER_SITES} MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR} diff --git a/lang/python/distinfo b/lang/python/distinfo index 49de91ae15e..5e2a54f4434 100644 --- a/lang/python/distinfo +++ b/lang/python/distinfo @@ -14,5 +14,6 @@ MD5 (python/Python-2.3.tgz) = 595620a4769073a812e353597585c4e8 MD5 (python/Python-2.3.1.tgz) = a3dcbe1c7f173c8e3c7cce28495016ae MD5 (python/Python-2.3.2.tgz) = f54d7a529d444994b4b33429bbb45479 MD5 (python/Python-2.3.3.tgz) = 4d16732b1cfccc0ed250956d41463c61 +SIZE (python/Python-2.3.3.tgz) = 8491380 MD5 (python/Python-2.4.a0.20031022.tgz) = 79581105c218886dd9dc382a84c64043 MD5 (python/Python-2.4.a0.20040106.tgz) = cde5962028bcfdb473455c57bbb24c18 diff --git a/lang/python/files/patch-Objects::intobject.c b/lang/python/files/patch-Objects::intobject.c new file mode 100644 index 00000000000..05983721a6c --- /dev/null +++ b/lang/python/files/patch-Objects::intobject.c @@ -0,0 +1,12 @@ +diff -u python/dist/src/Objects/intobject.c:2.105 python/dist/src/Objects/intobject.c:2.105.8.1 +--- Objects/intobject.c:2.105 Sat Jun 28 13:04:24 2003 ++++ Objects/intobject.c Sun Feb 8 10:56:07 2004 +@@ -1080,7 +1080,7 @@ + int ival; + #if NSMALLNEGINTS + NSMALLPOSINTS > 0 + for (ival = -NSMALLNEGINTS; ival < NSMALLPOSINTS; ival++) { +- if ((free_list = fill_free_list()) == NULL) ++ if (!free_list && (free_list = fill_free_list()) == NULL) + return 0; + /* PyObject_New is inlined */ + v = free_list; diff --git a/lang/python/files/patch-Objects::weakrefobject.c b/lang/python/files/patch-Objects::weakrefobject.c new file mode 100644 index 00000000000..13789fbde97 --- /dev/null +++ b/lang/python/files/patch-Objects::weakrefobject.c @@ -0,0 +1,65 @@ +diff -u python/dist/src/Objects/weakrefobject.c:1.13.6.1 python/dist/src/Objects/weakrefobject.c:1.13.6.3 +--- Objects/weakrefobject.c:1.13.6.1 Thu Nov 20 14:13:51 2003 ++++ Objects/weakrefobject.c Wed Feb 4 15:13:43 2004 +@@ -624,20 +624,29 @@ + } + list = GET_WEAKREFS_LISTPTR(ob); + get_basic_refs(*list, &ref, &proxy); +- if (callback == NULL || callback == Py_None) ++ if (callback == Py_None) ++ callback = NULL; ++ if (callback == NULL) + /* return existing weak reference if it exists */ + result = ref; + if (result != NULL) +- Py_XINCREF(result); ++ Py_INCREF(result); + else { ++ /* Note: new_weakref() can trigger cyclic GC, so the weakref ++ list on ob can be mutated. This means that the ref and ++ proxy pointers we got back earlier may have been collected, ++ so we need to compute these values again before we use ++ them. */ + result = new_weakref(ob, callback); + if (result != NULL) { + if (callback == NULL) { + insert_head(result, list); + } + else { +- PyWeakReference *prev = (proxy == NULL) ? ref : proxy; ++ PyWeakReference *prev; + ++ get_basic_refs(*list, &ref, &proxy); ++ prev = (proxy == NULL) ? ref : proxy; + if (prev == NULL) + insert_head(result, list); + else +@@ -664,12 +673,19 @@ + } + list = GET_WEAKREFS_LISTPTR(ob); + get_basic_refs(*list, &ref, &proxy); ++ if (callback == Py_None) ++ callback = NULL; + if (callback == NULL) + /* attempt to return an existing weak reference if it exists */ + result = proxy; + if (result != NULL) +- Py_XINCREF(result); ++ Py_INCREF(result); + else { ++ /* Note: new_weakref() can trigger cyclic GC, so the weakref ++ list on ob can be mutated. This means that the ref and ++ proxy pointers we got back earlier may have been collected, ++ so we need to compute these values again before we use ++ them. */ + result = new_weakref(ob, callback); + if (result != NULL) { + PyWeakReference *prev; +@@ -678,6 +694,7 @@ + result->ob_type = &_PyWeakref_CallableProxyType; + else + result->ob_type = &_PyWeakref_ProxyType; ++ get_basic_refs(*list, &ref, &proxy); + if (callback == NULL) + prev = ref; + else diff --git a/lang/python/files/patch-configure b/lang/python/files/patch-configure index 6ee47894e12..ef932698520 100644 --- a/lang/python/files/patch-configure +++ b/lang/python/files/patch-configure @@ -1,5 +1,5 @@ ---- configure.orig Sat Oct 4 13:27:50 2003 -+++ configure Sat Oct 4 13:29:05 2003 +--- configure.orig Wed Nov 19 04:59:36 2003 ++++ configure Mon Feb 9 17:39:34 2004 @@ -1321,7 +1321,7 @@ VERSION=2.3 @@ -9,16 +9,25 @@ # The later defininition of _XOPEN_SOURCE disables certain features # on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone). -@@ -3594,6 +3594,12 @@ - LDLIBRARY='libpython$(VERSION).so' - BLDLIBRARY='-L. -lpython$(VERSION)' +@@ -3608,6 +3608,12 @@ RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} -+ INSTSONAME="$LDLIBRARY".$SOVERSION -+ ;; + INSTSONAME="$LDLIBRARY".$SOVERSION + ;; + FreeBSD*) + LDLIBRARY='libpython$(VERSION).so' + BLDLIBRARY='-L. -lpython$(VERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH - INSTSONAME="$LDLIBRARY".$SOVERSION - ;; ++ INSTSONAME="$LDLIBRARY".$SOVERSION ++ ;; hp*|HP*) + LDLIBRARY='libpython$(VERSION).sl' + BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)' +@@ -12272,7 +12278,7 @@ + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +- ac_cv_pthread_system_supported=yes ++ ac_cv_pthread_system_supported="ignored by port" + else + echo "$as_me: program exited with status $ac_status" >&5 + echo "$as_me: failed program was:" >&5 |