aboutsummaryrefslogtreecommitdiff
path: root/lang/python24/files
diff options
context:
space:
mode:
authorHye-Shik Chang <perky@FreeBSD.org>2004-02-09 09:54:07 +0000
committerHye-Shik Chang <perky@FreeBSD.org>2004-02-09 09:54:07 +0000
commitd3a457db41524eef0d8bc9b8d54445b7b1163433 (patch)
tree11b78305919b6a74f7e60603763cf8515c613c01 /lang/python24/files
parent9817c9090f2b39ab9b68a5ab041ca9c3ccbbbfff (diff)
Notes
Diffstat (limited to 'lang/python24/files')
-rw-r--r--lang/python24/files/patch-Objects::intobject.c12
-rw-r--r--lang/python24/files/patch-Objects::weakrefobject.c65
-rw-r--r--lang/python24/files/patch-configure27
3 files changed, 95 insertions, 9 deletions
diff --git a/lang/python24/files/patch-Objects::intobject.c b/lang/python24/files/patch-Objects::intobject.c
new file mode 100644
index 000000000000..05983721a6cb
--- /dev/null
+++ b/lang/python24/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/python24/files/patch-Objects::weakrefobject.c b/lang/python24/files/patch-Objects::weakrefobject.c
new file mode 100644
index 000000000000..13789fbde97f
--- /dev/null
+++ b/lang/python24/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/python24/files/patch-configure b/lang/python24/files/patch-configure
index 6ee47894e12f..ef9326985205 100644
--- a/lang/python24/files/patch-configure
+++ b/lang/python24/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