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
60f01884
Kaydet (Commit)
60f01884
authored
Agu 22, 2001
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Merge changes from r22a2-branch back into trunk. Also, change patch
level to 2.2a2+
üst
0f10f840
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
18 deletions
+36
-18
patchlevel.h
Include/patchlevel.h
+2
-2
test_os.py
Lib/test/test_os.py
+3
-0
Setup.dist
Modules/Setup.dist
+1
-5
typeobject.c
Objects/typeobject.c
+30
-7
setup.py
setup.py
+0
-4
No files found.
Include/patchlevel.h
Dosyayı görüntüle @
60f01884
...
...
@@ -23,10 +23,10 @@
#define PY_MINOR_VERSION 2
#define PY_MICRO_VERSION 0
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA
#define PY_RELEASE_SERIAL
1
#define PY_RELEASE_SERIAL
2
/* Version as a string */
#define PY_VERSION "2.2a
1
+"
#define PY_VERSION "2.2a
2
+"
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */
...
...
Lib/test/test_os.py
Dosyayı görüntüle @
60f01884
...
...
@@ -6,6 +6,9 @@ import os
import
unittest
import
warnings
warnings
.
filterwarnings
(
"ignore"
,
"tempnam"
,
RuntimeWarning
,
__name__
)
warnings
.
filterwarnings
(
"ignore"
,
"tmpnam"
,
RuntimeWarning
,
__name__
)
from
test_support
import
TESTFN
,
run_unittest
...
...
Modules/Setup.dist
Dosyayı görüntüle @
60f01884
...
...
@@ -98,6 +98,7 @@ PYTHONPATH=$(COREPYTHONPATH)
posix
posixmodule.c
# posix (UNIX) system calls
_sre
_sre.c
# Fredrik Lundh's new regular expressions
new
newmodule.c
# Tommy Burnette's 'new' module
# The rest of the modules listed in this file are all commented out by
# default. Usually they can be detected and built as dynamically
...
...
@@ -347,11 +348,6 @@ GLHACK=-Dclear=__GLclear
#_curses_panel _curses_panel.c -lpanel -lncurses
# Tommy Burnette's 'new' module (creates new empty objects of certain kinds):
#new newmodule.c
# Generic (SunOS / SVR4) dynamic loading module.
# This is not needed for dynamic loading of Python modules --
# it is a highly experimental and dangerous device for calling
...
...
Objects/typeobject.c
Dosyayı görüntüle @
60f01884
...
...
@@ -2091,29 +2091,52 @@ static struct wrapperbase tab_init[] = {
static
PyObject
*
tp_new_wrapper
(
PyObject
*
self
,
PyObject
*
args
,
PyObject
*
kwds
)
{
PyTypeObject
*
type
,
*
subtype
;
PyTypeObject
*
type
,
*
subtype
,
*
staticbase
;
PyObject
*
arg0
,
*
res
;
if
(
self
==
NULL
||
!
PyType_Check
(
self
))
Py_FatalError
(
"__new__() called with non-type 'self'"
);
type
=
(
PyTypeObject
*
)
self
;
if
(
!
PyTuple_Check
(
args
)
||
PyTuple_GET_SIZE
(
args
)
<
1
)
{
PyErr_SetString
(
PyExc_TypeError
,
"T.__new__(): not enough arguments"
);
PyErr_Format
(
PyExc_TypeError
,
"%s.__new__(): not enough arguments"
,
type
->
tp_name
);
return
NULL
;
}
arg0
=
PyTuple_GET_ITEM
(
args
,
0
);
if
(
!
PyType_Check
(
arg0
))
{
PyErr_SetString
(
PyExc_TypeError
,
"T.__new__(S): S is not a type object"
);
PyErr_Format
(
PyExc_TypeError
,
"%s.__new__(X): X is not a type object (%s)"
,
type
->
tp_name
,
arg0
->
ob_type
->
tp_name
);
return
NULL
;
}
subtype
=
(
PyTypeObject
*
)
arg0
;
if
(
!
PyType_IsSubtype
(
subtype
,
type
))
{
PyErr_SetString
(
PyExc_TypeError
,
"T.__new__(S): S is not a subtype of T"
);
PyErr_Format
(
PyExc_TypeError
,
"%s.__new__(%s): %s is not a subtype of %s"
,
type
->
tp_name
,
subtype
->
tp_name
,
subtype
->
tp_name
,
type
->
tp_name
);
return
NULL
;
}
/* Check that the use doesn't do something silly and unsafe like
object.__new__(dictionary). To do this, we check that the
most derived base that's not a heap type is this type. */
staticbase
=
subtype
;
while
(
staticbase
&&
(
staticbase
->
tp_flags
&
Py_TPFLAGS_HEAPTYPE
))
staticbase
=
staticbase
->
tp_base
;
if
(
staticbase
!=
type
)
{
PyErr_Format
(
PyExc_TypeError
,
"%s.__new__(%s) is not safe, use %s.__new__()"
,
type
->
tp_name
,
subtype
->
tp_name
,
staticbase
==
NULL
?
"?"
:
staticbase
->
tp_name
);
return
NULL
;
}
args
=
PyTuple_GetSlice
(
args
,
1
,
PyTuple_GET_SIZE
(
args
));
if
(
args
==
NULL
)
return
NULL
;
...
...
setup.py
Dosyayı görüntüle @
60f01884
...
...
@@ -269,10 +269,6 @@ class PyBuildExt(build_ext):
# (NIST's Secure Hash Algorithm.)
exts
.
append
(
Extension
(
'sha'
,
[
'shamodule.c'
])
)
# Tommy Burnette's 'new' module (creates new empty objects of certain
# kinds):
exts
.
append
(
Extension
(
'new'
,
[
'newmodule.c'
])
)
# Helper module for various ascii-encoders
exts
.
append
(
Extension
(
'binascii'
,
[
'binascii.c'
])
)
...
...
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