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
7f810cd9
Kaydet (Commit)
7f810cd9
authored
Nis 25, 2010
tarafından
Sean Reifscheider
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Porting commit 80458 to python 3
üst
40f0874b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
syslogmodule.c
Modules/syslogmodule.c
+10
-5
No files found.
Modules/syslogmodule.c
Dosyayı görüntüle @
7f810cd9
...
@@ -56,6 +56,7 @@ Revision history:
...
@@ -56,6 +56,7 @@ Revision history:
/* only one instance, only one syslog, so globals should be ok */
/* only one instance, only one syslog, so globals should be ok */
static
PyObject
*
S_ident_o
=
NULL
;
/* identifier, held by openlog() */
static
PyObject
*
S_ident_o
=
NULL
;
/* identifier, held by openlog() */
static
char
S_log_open
=
0
;
static
PyObject
*
static
PyObject
*
...
@@ -135,6 +136,7 @@ syslog_openlog(PyObject * self, PyObject * args, PyObject *kwds)
...
@@ -135,6 +136,7 @@ syslog_openlog(PyObject * self, PyObject * args, PyObject *kwds)
*/
*/
openlog
(
S_ident_o
?
_PyUnicode_AsString
(
S_ident_o
)
:
NULL
,
logopt
,
facility
);
openlog
(
S_ident_o
?
_PyUnicode_AsString
(
S_ident_o
)
:
NULL
,
logopt
,
facility
);
S_log_open
=
1
;
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
...
@@ -160,8 +162,8 @@ syslog_syslog(PyObject * self, PyObject * args)
...
@@ -160,8 +162,8 @@ syslog_syslog(PyObject * self, PyObject * args)
if
(
message
==
NULL
)
if
(
message
==
NULL
)
return
NULL
;
return
NULL
;
/*
call openlog if no current identifier
*/
/*
if log is not opened, open it now
*/
if
(
!
S_
ident_o
)
{
if
(
!
S_
log_open
)
{
PyObject
*
openargs
;
PyObject
*
openargs
;
/* Continue even if PyTuple_New fails, because openlog(3) is optional.
/* Continue even if PyTuple_New fails, because openlog(3) is optional.
...
@@ -184,9 +186,12 @@ syslog_syslog(PyObject * self, PyObject * args)
...
@@ -184,9 +186,12 @@ syslog_syslog(PyObject * self, PyObject * args)
static
PyObject
*
static
PyObject
*
syslog_closelog
(
PyObject
*
self
,
PyObject
*
unused
)
syslog_closelog
(
PyObject
*
self
,
PyObject
*
unused
)
{
{
closelog
();
if
(
S_log_open
)
{
Py_XDECREF
(
S_ident_o
);
closelog
();
S_ident_o
=
NULL
;
Py_XDECREF
(
S_ident_o
);
S_ident_o
=
NULL
;
S_log_open
=
0
;
}
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
}
}
...
...
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