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
2341f9ba
Kaydet (Commit)
2341f9ba
authored
May 09, 2011
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove dead code from _multiprocessing
üst
fc753932
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
58 deletions
+3
-58
multiprocessing.c
Modules/_multiprocessing/multiprocessing.c
+1
-11
multiprocessing.h
Modules/_multiprocessing/multiprocessing.h
+0
-45
semaphore.c
Modules/_multiprocessing/semaphore.c
+2
-2
No files found.
Modules/_multiprocessing/multiprocessing.c
Dosyayı görüntüle @
2341f9ba
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
PyObject
*
create_win32_namespace
(
void
);
PyObject
*
create_win32_namespace
(
void
);
PyObject
*
pickle_dumps
,
*
pickle_loads
,
*
pickle_protocol
;
PyObject
*
ProcessError
,
*
BufferTooShort
;
PyObject
*
ProcessError
,
*
BufferTooShort
;
/*
/*
...
@@ -177,7 +176,7 @@ multiprocessing_address_of_buffer(PyObject *self, PyObject *obj)
...
@@ -177,7 +176,7 @@ multiprocessing_address_of_buffer(PyObject *self, PyObject *obj)
if
(
PyObject_AsWriteBuffer
(
obj
,
&
buffer
,
&
buffer_len
)
<
0
)
if
(
PyObject_AsWriteBuffer
(
obj
,
&
buffer
,
&
buffer_len
)
<
0
)
return
NULL
;
return
NULL
;
return
Py_BuildValue
(
"N
"
F_PY_SSIZE_T
,
return
Py_BuildValue
(
"N
n"
,
PyLong_FromVoidPtr
(
buffer
),
buffer_len
);
PyLong_FromVoidPtr
(
buffer
),
buffer_len
);
}
}
...
@@ -231,15 +230,6 @@ PyInit__multiprocessing(void)
...
@@ -231,15 +230,6 @@ PyInit__multiprocessing(void)
if
(
!
module
)
if
(
!
module
)
return
NULL
;
return
NULL
;
/* Get copy of objects from pickle */
temp
=
PyImport_ImportModule
(
PICKLE_MODULE
);
if
(
!
temp
)
return
NULL
;
pickle_dumps
=
PyObject_GetAttrString
(
temp
,
"dumps"
);
pickle_loads
=
PyObject_GetAttrString
(
temp
,
"loads"
);
pickle_protocol
=
PyObject_GetAttrString
(
temp
,
"HIGHEST_PROTOCOL"
);
Py_XDECREF
(
temp
);
/* Get copy of BufferTooShort */
/* Get copy of BufferTooShort */
temp
=
PyImport_ImportModule
(
"multiprocessing"
);
temp
=
PyImport_ImportModule
(
"multiprocessing"
);
if
(
!
temp
)
if
(
!
temp
)
...
...
Modules/_multiprocessing/multiprocessing.h
Dosyayı görüntüle @
2341f9ba
...
@@ -63,20 +63,6 @@
...
@@ -63,20 +63,6 @@
#endif
#endif
/*
* Make sure Py_ssize_t available
*/
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef
int
Py_ssize_t
;
# define PY_SSIZE_T_MAX INT_MAX
# define PY_SSIZE_T_MIN INT_MIN
# define F_PY_SSIZE_T "i"
# define PyInt_FromSsize_t(n) PyInt_FromLong((long)n)
#else
# define F_PY_SSIZE_T "n"
#endif
/*
/*
* Format codes
* Format codes
*/
*/
...
@@ -105,12 +91,6 @@
...
@@ -105,12 +91,6 @@
# define T_SEM_HANDLE T_POINTER
# define T_SEM_HANDLE T_POINTER
#endif
#endif
#if PY_VERSION_HEX >= 0x03000000
# define F_RBUFFER "y"
#else
# define F_RBUFFER "s"
#endif
/*
/*
* Error codes which can be returned by functions called without GIL
* Error codes which can be returned by functions called without GIL
*/
*/
...
@@ -127,36 +107,11 @@ PyObject *mp_SetError(PyObject *Type, int num);
...
@@ -127,36 +107,11 @@ PyObject *mp_SetError(PyObject *Type, int num);
* Externs - not all will really exist on all platforms
* Externs - not all will really exist on all platforms
*/
*/
extern
PyObject
*
pickle_dumps
;
extern
PyObject
*
pickle_loads
;
extern
PyObject
*
pickle_protocol
;
extern
PyObject
*
BufferTooShort
;
extern
PyObject
*
BufferTooShort
;
extern
PyTypeObject
SemLockType
;
extern
PyTypeObject
SemLockType
;
extern
PyTypeObject
PipeConnectionType
;
extern
PyTypeObject
PipeConnectionType
;
extern
HANDLE
sigint_event
;
extern
HANDLE
sigint_event
;
/*
* Py3k compatibility
*/
#if PY_VERSION_HEX >= 0x03000000
# define PICKLE_MODULE "pickle"
# define FROM_FORMAT PyUnicode_FromFormat
# define PyInt_FromLong PyLong_FromLong
# define PyInt_FromSsize_t PyLong_FromSsize_t
#else
# define PICKLE_MODULE "cPickle"
# define FROM_FORMAT PyString_FromFormat
#endif
#ifndef PyVarObject_HEAD_INIT
# define PyVarObject_HEAD_INIT(type, size) PyObject_HEAD_INIT(type) size,
#endif
#ifndef Py_TPFLAGS_HAVE_WEAKREFS
# define Py_TPFLAGS_HAVE_WEAKREFS 0
#endif
/*
/*
* Miscellaneous
* Miscellaneous
*/
*/
...
...
Modules/_multiprocessing/semaphore.c
Dosyayı görüntüle @
2341f9ba
...
@@ -481,7 +481,7 @@ semlock_dealloc(SemLockObject* self)
...
@@ -481,7 +481,7 @@ semlock_dealloc(SemLockObject* self)
static
PyObject
*
static
PyObject
*
semlock_count
(
SemLockObject
*
self
)
semlock_count
(
SemLockObject
*
self
)
{
{
return
Py
Int
_FromLong
((
long
)
self
->
count
);
return
Py
Long
_FromLong
((
long
)
self
->
count
);
}
}
static
PyObject
*
static
PyObject
*
...
@@ -505,7 +505,7 @@ semlock_getvalue(SemLockObject *self)
...
@@ -505,7 +505,7 @@ semlock_getvalue(SemLockObject *self)
the number of waiting threads */
the number of waiting threads */
if
(
sval
<
0
)
if
(
sval
<
0
)
sval
=
0
;
sval
=
0
;
return
Py
Int
_FromLong
((
long
)
sval
);
return
Py
Long
_FromLong
((
long
)
sval
);
#endif
#endif
}
}
...
...
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