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
57269d0c
Kaydet (Commit)
57269d0c
authored
Agu 31, 2004
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove mpz, rotor, xreadlines modules
üst
810b76ae
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
216 deletions
+2
-216
BeOS-setup.py
Misc/BeOS-setup.py
+1
-22
mpzmodule.c
Modules/mpzmodule.c
+0
-0
rotormodule.c
Modules/rotormodule.c
+0
-0
xreadlinesmodule.c
Modules/xreadlinesmodule.c
+0
-171
setup.py
setup.py
+1
-23
No files found.
Misc/BeOS-setup.py
Dosyayı görüntüle @
57269d0c
...
...
@@ -180,7 +180,6 @@ class PyBuildExt(build_ext):
exts
.
append
(
Extension
(
'_weakref'
,
[
'_weakref.c'
])
)
exts
.
append
(
Extension
(
'_symtable'
,
[
'symtablemodule.c'
])
)
exts
.
append
(
Extension
(
'xreadlines'
,
[
'xreadlinesmodule.c'
])
)
# array objects
exts
.
append
(
Extension
(
'array'
,
[
'arraymodule.c'
])
)
...
...
@@ -244,10 +243,7 @@ class PyBuildExt(build_ext):
# Memory-mapped files (also works on Win32).
exts
.
append
(
Extension
(
'mmap'
,
[
'mmapmodule.c'
])
)
# Lance Ellinghaus's modules:
# enigma-inspired encryption
exts
.
append
(
Extension
(
'rotor'
,
[
'rotormodule.c'
])
)
# syslog daemon interface
# Lance Ellinghaus's syslog daemon interface
exts
.
append
(
Extension
(
'syslog'
,
[
'syslogmodule.c'
])
)
# George Neville-Neil's timing module:
...
...
@@ -361,23 +357,6 @@ class PyBuildExt(build_ext):
include_dirs
=
db_inc
,
libraries
=
dblib
)
)
# The mpz module interfaces to the GNU Multiple Precision library.
# You need to ftp the GNU MP library.
# This was originally written and tested against GMP 1.2 and 1.3.2.
# It has been modified by Rob Hooft to work with 2.0.2 as well, but I
# haven't tested it recently. For a more complete module,
# refer to pympz.sourceforge.net.
# A compatible MP library unencombered by the GPL also exists. It was
# posted to comp.sources.misc in volume 40 and is widely available from
# FTP archive sites. One URL for it is:
# ftp://gatekeeper.dec.com/.b/usenet/comp.sources.misc/volume40/fgmp/part01.Z
if
(
self
.
compiler
.
find_library_file
(
lib_dirs
,
'gmp'
)):
exts
.
append
(
Extension
(
'mpz'
,
[
'mpzmodule.c'
],
libraries
=
[
'gmp'
]
)
)
# Unix-only modules
if
platform
not
in
[
'mac'
,
'win32'
]:
# Steen Lumholt's termios module
...
...
Modules/mpzmodule.c
deleted
100644 → 0
Dosyayı görüntüle @
810b76ae
This diff is collapsed.
Click to expand it.
Modules/rotormodule.c
deleted
100644 → 0
Dosyayı görüntüle @
810b76ae
This diff is collapsed.
Click to expand it.
Modules/xreadlinesmodule.c
deleted
100644 → 0
Dosyayı görüntüle @
810b76ae
#include "Python.h"
PyDoc_STRVAR
(
xreadlines_doc
,
"xreadlines(f)
\n
\
\n
\
Return an xreadlines object for the file f."
);
typedef
struct
{
PyObject_HEAD
PyObject
*
file
;
PyObject
*
lines
;
int
lineslen
;
int
lineno
;
int
abslineno
;
}
PyXReadlinesObject
;
static
PyTypeObject
XReadlinesObject_Type
;
static
void
xreadlines_dealloc
(
PyXReadlinesObject
*
op
)
{
Py_XDECREF
(
op
->
file
);
Py_XDECREF
(
op
->
lines
);
PyObject_DEL
(
op
);
}
/* A larger chunk size doesn't seem to make a difference */
#define CHUNKSIZE 8192
static
PyXReadlinesObject
*
newreadlinesobject
(
PyObject
*
file
)
{
PyXReadlinesObject
*
op
;
op
=
PyObject_NEW
(
PyXReadlinesObject
,
&
XReadlinesObject_Type
);
if
(
op
==
NULL
)
return
NULL
;
Py_XINCREF
(
file
);
op
->
file
=
file
;
op
->
lines
=
NULL
;
op
->
abslineno
=
op
->
lineno
=
op
->
lineslen
=
0
;
return
op
;
}
static
PyObject
*
xreadlines
(
PyObject
*
self
,
PyObject
*
args
)
{
PyObject
*
file
;
PyXReadlinesObject
*
ret
;
if
(
!
PyArg_ParseTuple
(
args
,
"O:xreadlines"
,
&
file
))
return
NULL
;
ret
=
newreadlinesobject
(
file
);
return
(
PyObject
*
)
ret
;
}
static
PyObject
*
xreadlines_common
(
PyXReadlinesObject
*
a
)
{
if
(
a
->
lineno
>=
a
->
lineslen
)
{
Py_XDECREF
(
a
->
lines
);
a
->
lines
=
PyObject_CallMethod
(
a
->
file
,
"readlines"
,
"(i)"
,
CHUNKSIZE
);
if
(
a
->
lines
==
NULL
)
return
NULL
;
a
->
lineno
=
0
;
if
((
a
->
lineslen
=
PySequence_Size
(
a
->
lines
))
<
0
)
return
NULL
;
}
a
->
abslineno
++
;
return
PySequence_GetItem
(
a
->
lines
,
a
->
lineno
++
);
}
static
PyObject
*
xreadlines_item
(
PyXReadlinesObject
*
a
,
int
i
)
{
if
(
i
!=
a
->
abslineno
)
{
PyErr_SetString
(
PyExc_RuntimeError
,
"xreadlines object accessed out of order"
);
return
NULL
;
}
return
xreadlines_common
(
a
);
}
static
PyObject
*
xreadlines_iternext
(
PyXReadlinesObject
*
a
)
{
PyObject
*
res
;
res
=
xreadlines_common
(
a
);
if
(
res
==
NULL
&&
PyErr_ExceptionMatches
(
PyExc_IndexError
))
PyErr_Clear
();
return
res
;
}
static
PyObject
*
xreadlines_next
(
PyXReadlinesObject
*
a
,
PyObject
*
args
)
{
PyObject
*
res
;
if
(
!
PyArg_ParseTuple
(
args
,
""
))
return
NULL
;
res
=
xreadlines_common
(
a
);
if
(
res
==
NULL
&&
PyErr_ExceptionMatches
(
PyExc_IndexError
))
PyErr_SetObject
(
PyExc_StopIteration
,
Py_None
);
return
res
;
}
PyDoc_STRVAR
(
next_doc
,
"x.next() -> the next line or raise StopIteration"
);
static
PyMethodDef
xreadlines_methods
[]
=
{
{
"next"
,
(
PyCFunction
)
xreadlines_next
,
METH_VARARGS
,
next_doc
},
{
NULL
,
NULL
}
};
static
PyObject
*
xreadlines_getattr
(
PyObject
*
a
,
char
*
name
)
{
return
Py_FindMethod
(
xreadlines_methods
,
a
,
name
);
}
static
PySequenceMethods
xreadlines_as_sequence
=
{
0
,
/*sq_length*/
0
,
/*sq_concat*/
0
,
/*sq_repeat*/
(
intargfunc
)
xreadlines_item
,
/*sq_item*/
};
static
PyTypeObject
XReadlinesObject_Type
=
{
PyObject_HEAD_INIT
(
NULL
)
0
,
"xreadlines.xreadlines"
,
sizeof
(
PyXReadlinesObject
),
0
,
(
destructor
)
xreadlines_dealloc
,
/* tp_dealloc */
0
,
/* tp_print */
xreadlines_getattr
,
/* tp_getattr */
0
,
/* tp_setattr */
0
,
/* tp_compare */
0
,
/* tp_repr */
0
,
/* tp_as_number */
&
xreadlines_as_sequence
,
/* tp_as_sequence */
0
,
/* tp_as_mapping */
0
,
/* tp_hash */
0
,
/* tp_call */
0
,
/* tp_str */
0
,
/* tp_getattro */
0
,
/* tp_setattro */
0
,
/* tp_as_buffer */
Py_TPFLAGS_DEFAULT
,
/* tp_flags */
0
,
/* tp_doc */
0
,
/* tp_traverse */
0
,
/* tp_clear */
0
,
/* tp_richcompare */
0
,
/* tp_weaklistoffset */
PyObject_SelfIter
,
/* tp_iter */
(
iternextfunc
)
xreadlines_iternext
,
/* tp_iternext */
};
static
PyMethodDef
xreadlines_functions
[]
=
{
{
"xreadlines"
,
xreadlines
,
METH_VARARGS
,
xreadlines_doc
},
{
NULL
,
NULL
}
};
PyMODINIT_FUNC
initxreadlines
(
void
)
{
XReadlinesObject_Type
.
ob_type
=
&
PyType_Type
;
Py_InitModule
(
"xreadlines"
,
xreadlines_functions
);
PyErr_Warn
(
PyExc_DeprecationWarning
,
"xreadlines is deprecated; use 'for line in file'."
);
}
setup.py
Dosyayı görüntüle @
57269d0c
...
...
@@ -300,7 +300,6 @@ class PyBuildExt(build_ext):
exts
.
append
(
Extension
(
'_hotshot'
,
[
'_hotshot.c'
])
)
exts
.
append
(
Extension
(
'_weakref'
,
[
'_weakref.c'
])
)
exts
.
append
(
Extension
(
'xreadlines'
,
[
'xreadlinesmodule.c'
])
)
# array objects
exts
.
append
(
Extension
(
'array'
,
[
'arraymodule.c'
])
)
...
...
@@ -389,9 +388,7 @@ class PyBuildExt(build_ext):
if
platform
not
in
[
'atheos'
,
'mac'
]:
exts
.
append
(
Extension
(
'mmap'
,
[
'mmapmodule.c'
])
)
# Lance Ellinghaus's modules:
# enigma-inspired encryption
exts
.
append
(
Extension
(
'rotor'
,
[
'rotormodule.c'
])
)
# Lance Ellinghaus's syslog module
if
platform
not
in
[
'mac'
]:
# syslog daemon interface
exts
.
append
(
Extension
(
'syslog'
,
[
'syslogmodule.c'
])
)
...
...
@@ -629,25 +626,6 @@ class PyBuildExt(build_ext):
exts
.
append
(
Extension
(
'gdbm'
,
[
'gdbmmodule.c'
],
libraries
=
[
'gdbm'
]
)
)
# The mpz module interfaces to the GNU Multiple Precision library.
# You need to ftp the GNU MP library.
# This was originally written and tested against GMP 1.2 and 1.3.2.
# It has been modified by Rob Hooft to work with 2.0.2 as well, but I
# haven't tested it recently, and it definitely doesn't work with
# GMP 4.0. For more complete modules, refer to
# http://gmpy.sourceforge.net and
# http://www.egenix.com/files/python/mxNumber.html
# A compatible MP library unencumbered by the GPL also exists. It was
# posted to comp.sources.misc in volume 40 and is widely available from
# FTP archive sites. One URL for it is:
# ftp://gatekeeper.dec.com/.b/usenet/comp.sources.misc/volume40/fgmp/part01.Z
if
(
self
.
compiler
.
find_library_file
(
lib_dirs
,
'gmp'
)):
exts
.
append
(
Extension
(
'mpz'
,
[
'mpzmodule.c'
],
libraries
=
[
'gmp'
]
)
)
# Unix-only modules
if
platform
not
in
[
'mac'
,
'win32'
]:
# Steen Lumholt's termios module
...
...
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