Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
968117e9
Kaydet (Commit)
968117e9
authored
Tem 02, 2008
tarafından
Amaury Forgeot d'Arc
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Try a blind fix to nismodule which fails on the solaris10 3.0 buildbot:
the GIL must be re-acquired in the callback function
üst
0bfac6e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
nismodule.c
Modules/nismodule.c
+8
-5
No files found.
Modules/nismodule.c
Dosyayı görüntüle @
968117e9
...
...
@@ -98,6 +98,7 @@ typedef int (*foreachfunc)(int, char *, int, char *, int, char *);
struct
ypcallback_data
{
PyObject
*
dict
;
int
fix
;
PyThreadState
*
state
;
};
static
int
...
...
@@ -109,6 +110,7 @@ nis_foreach (int instatus, char *inkey, int inkeylen, char *inval,
PyObject
*
val
;
int
err
;
PyEval_RestoreThread
(
indata
->
state
);
if
(
indata
->
fix
)
{
if
(
inkeylen
>
0
&&
inkey
[
inkeylen
-
1
]
==
'\0'
)
inkeylen
--
;
...
...
@@ -127,10 +129,11 @@ nis_foreach (int instatus, char *inkey, int inkeylen, char *inval,
err
=
PyDict_SetItem
(
indata
->
dict
,
key
,
val
);
Py_DECREF
(
key
);
Py_DECREF
(
val
);
if
(
err
!=
0
)
{
if
(
err
!=
0
)
PyErr_Clear
();
return
1
;
}
indata
->
state
=
PyEval_SaveThread
();
if
(
err
!=
0
)
return
1
;
return
0
;
}
return
1
;
...
...
@@ -206,9 +209,9 @@ nis_cat (PyObject *self, PyObject *args, PyObject *kwdict)
data
.
dict
=
dict
;
map
=
nis_mapname
(
map
,
&
data
.
fix
);
cb
.
data
=
(
char
*
)
&
data
;
Py_BEGIN_ALLOW_THREADS
data
.
state
=
PyEval_SaveThread
();
err
=
yp_all
(
domain
,
map
,
&
cb
);
Py
_END_ALLOW_THREADS
Py
Eval_RestoreThread
(
data
.
state
);
if
(
err
!=
0
)
{
Py_DECREF
(
dict
);
return
nis_error
(
err
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment