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
bffd683f
Kaydet (Commit)
bffd683f
authored
Ock 20, 2000
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
The rest of the changes by Trent Mick and Dale Nagata for warning-free
compilation on NT Alpha. Mostly added casts etc.
üst
e0a928dc
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
34 additions
and
22 deletions
+34
-22
object.h
Include/object.h
+1
-0
arraymodule.c
Modules/arraymodule.c
+1
-1
classobject.c
Objects/classobject.c
+3
-3
complexobject.c
Objects/complexobject.c
+1
-1
floatobject.c
Objects/floatobject.c
+1
-1
frameobject.c
Objects/frameobject.c
+2
-2
intobject.c
Objects/intobject.c
+1
-1
listobject.c
Objects/listobject.c
+1
-1
methodobject.c
Objects/methodobject.c
+1
-1
object.c
Objects/object.c
+4
-2
stringobject.c
Objects/stringobject.c
+4
-4
tupleobject.c
Objects/tupleobject.c
+3
-3
config.h
PC/config.h
+6
-1
pythonrun.c
Python/pythonrun.c
+4
-0
thread_nt.h
Python/thread_nt.h
+1
-1
No files found.
Include/object.h
Dosyayı görüntüle @
bffd683f
...
@@ -362,6 +362,7 @@ extern DL_IMPORT(void) _Py_Dealloc Py_PROTO((PyObject *));
...
@@ -362,6 +362,7 @@ extern DL_IMPORT(void) _Py_Dealloc Py_PROTO((PyObject *));
extern
DL_IMPORT
(
void
)
_Py_NewReference
Py_PROTO
((
PyObject
*
));
extern
DL_IMPORT
(
void
)
_Py_NewReference
Py_PROTO
((
PyObject
*
));
extern
DL_IMPORT
(
void
)
_Py_ForgetReference
Py_PROTO
((
PyObject
*
));
extern
DL_IMPORT
(
void
)
_Py_ForgetReference
Py_PROTO
((
PyObject
*
));
extern
DL_IMPORT
(
void
)
_Py_PrintReferences
Py_PROTO
((
FILE
*
));
extern
DL_IMPORT
(
void
)
_Py_PrintReferences
Py_PROTO
((
FILE
*
));
extern
DL_IMPORT
(
void
)
_Py_ResetReferences
Py_PROTO
((
void
));
#endif
#endif
#ifndef Py_TRACE_REFS
#ifndef Py_TRACE_REFS
...
...
Modules/arraymodule.c
Dosyayı görüntüle @
bffd683f
...
@@ -363,7 +363,7 @@ newarrayobject(size, descr)
...
@@ -363,7 +363,7 @@ newarrayobject(size, descr)
op
->
ob_type
=
&
Arraytype
;
op
->
ob_type
=
&
Arraytype
;
op
->
ob_size
=
size
;
op
->
ob_size
=
size
;
op
->
ob_descr
=
descr
;
op
->
ob_descr
=
descr
;
_Py_NewReference
(
op
);
_Py_NewReference
(
(
PyObject
*
)
op
);
return
(
PyObject
*
)
op
;
return
(
PyObject
*
)
op
;
}
}
...
...
Objects/classobject.c
Dosyayı görüntüle @
bffd683f
...
@@ -504,7 +504,7 @@ instance_dealloc(inst)
...
@@ -504,7 +504,7 @@ instance_dealloc(inst)
/* much too complicated if Py_TRACE_REFS defined */
/* much too complicated if Py_TRACE_REFS defined */
extern
long
_Py_RefTotal
;
extern
long
_Py_RefTotal
;
inst
->
ob_type
=
&
PyInstance_Type
;
inst
->
ob_type
=
&
PyInstance_Type
;
_Py_NewReference
(
inst
);
_Py_NewReference
(
(
PyObject
*
)
inst
);
_Py_RefTotal
--
;
/* compensate for increment in NEWREF */
_Py_RefTotal
--
;
/* compensate for increment in NEWREF */
#ifdef COUNT_ALLOCS
#ifdef COUNT_ALLOCS
inst
->
ob_type
->
tp_alloc
--
;
/* ditto */
inst
->
ob_type
->
tp_alloc
--
;
/* ditto */
...
@@ -556,7 +556,7 @@ instance_dealloc(inst)
...
@@ -556,7 +556,7 @@ instance_dealloc(inst)
#ifdef COUNT_ALLOCS
#ifdef COUNT_ALLOCS
inst
->
ob_type
->
tp_free
--
;
/* compensate for increment in UNREF */
inst
->
ob_type
->
tp_free
--
;
/* compensate for increment in UNREF */
#endif
#endif
_Py_ForgetReference
(
inst
);
_Py_ForgetReference
(
(
PyObject
*
)
inst
);
inst
->
ob_type
=
NULL
;
inst
->
ob_type
=
NULL
;
#endif
/* Py_TRACE_REFS */
#endif
/* Py_TRACE_REFS */
Py_DECREF
(
inst
->
in_class
);
Py_DECREF
(
inst
->
in_class
);
...
@@ -1431,7 +1431,7 @@ PyMethod_New(func, self, class)
...
@@ -1431,7 +1431,7 @@ PyMethod_New(func, self, class)
if
(
im
!=
NULL
)
{
if
(
im
!=
NULL
)
{
free_list
=
(
PyMethodObject
*
)(
im
->
im_self
);
free_list
=
(
PyMethodObject
*
)(
im
->
im_self
);
im
->
ob_type
=
&
PyMethod_Type
;
im
->
ob_type
=
&
PyMethod_Type
;
_Py_NewReference
(
im
);
_Py_NewReference
(
(
PyObject
*
)
im
);
}
}
else
{
else
{
im
=
PyObject_NEW
(
PyMethodObject
,
&
PyMethod_Type
);
im
=
PyObject_NEW
(
PyMethodObject
,
&
PyMethod_Type
);
...
...
Objects/complexobject.c
Dosyayı görüntüle @
bffd683f
...
@@ -172,7 +172,7 @@ PyComplex_FromCComplex(cval)
...
@@ -172,7 +172,7 @@ PyComplex_FromCComplex(cval)
return
PyErr_NoMemory
();
return
PyErr_NoMemory
();
op
->
ob_type
=
&
PyComplex_Type
;
op
->
ob_type
=
&
PyComplex_Type
;
op
->
cval
=
cval
;
op
->
cval
=
cval
;
_Py_NewReference
(
op
);
_Py_NewReference
(
(
PyObject
*
)
op
);
return
(
PyObject
*
)
op
;
return
(
PyObject
*
)
op
;
}
}
...
...
Objects/floatobject.c
Dosyayı görüntüle @
bffd683f
...
@@ -145,7 +145,7 @@ PyFloat_FromDouble(fval)
...
@@ -145,7 +145,7 @@ PyFloat_FromDouble(fval)
free_list
=
(
PyFloatObject
*
)
op
->
ob_type
;
free_list
=
(
PyFloatObject
*
)
op
->
ob_type
;
op
->
ob_type
=
&
PyFloat_Type
;
op
->
ob_type
=
&
PyFloat_Type
;
op
->
ob_fval
=
fval
;
op
->
ob_fval
=
fval
;
_Py_NewReference
(
op
);
_Py_NewReference
(
(
PyObject
*
)
op
);
return
(
PyObject
*
)
op
;
return
(
PyObject
*
)
op
;
}
}
...
...
Objects/frameobject.c
Dosyayı görüntüle @
bffd683f
...
@@ -184,7 +184,7 @@ PyFrame_New(tstate, code, globals, locals)
...
@@ -184,7 +184,7 @@ PyFrame_New(tstate, code, globals, locals)
if
(
f
==
NULL
)
if
(
f
==
NULL
)
return
(
PyFrameObject
*
)
PyErr_NoMemory
();
return
(
PyFrameObject
*
)
PyErr_NoMemory
();
f
->
ob_type
=
&
PyFrame_Type
;
f
->
ob_type
=
&
PyFrame_Type
;
_Py_NewReference
(
f
);
_Py_NewReference
(
(
PyObject
*
)
f
);
}
}
else
{
else
{
f
=
free_list
;
f
=
free_list
;
...
@@ -199,7 +199,7 @@ PyFrame_New(tstate, code, globals, locals)
...
@@ -199,7 +199,7 @@ PyFrame_New(tstate, code, globals, locals)
else
else
extras
=
f
->
f_nlocals
+
f
->
f_stacksize
;
extras
=
f
->
f_nlocals
+
f
->
f_stacksize
;
f
->
ob_type
=
&
PyFrame_Type
;
f
->
ob_type
=
&
PyFrame_Type
;
_Py_NewReference
(
f
);
_Py_NewReference
(
(
PyObject
*
)
f
);
}
}
if
(
builtins
==
NULL
)
{
if
(
builtins
==
NULL
)
{
/* No builtins! Make up a minimal one. */
/* No builtins! Make up a minimal one. */
...
...
Objects/intobject.c
Dosyayı görüntüle @
bffd683f
...
@@ -168,7 +168,7 @@ PyInt_FromLong(ival)
...
@@ -168,7 +168,7 @@ PyInt_FromLong(ival)
free_list
=
(
PyIntObject
*
)
v
->
ob_type
;
free_list
=
(
PyIntObject
*
)
v
->
ob_type
;
v
->
ob_type
=
&
PyInt_Type
;
v
->
ob_type
=
&
PyInt_Type
;
v
->
ob_ival
=
ival
;
v
->
ob_ival
=
ival
;
_Py_NewReference
(
v
);
_Py_NewReference
(
(
PyObject
*
)
v
);
#if NSMALLNEGINTS + NSMALLPOSINTS > 0
#if NSMALLNEGINTS + NSMALLPOSINTS > 0
if
(
-
NSMALLNEGINTS
<=
ival
&&
ival
<
NSMALLPOSINTS
)
{
if
(
-
NSMALLNEGINTS
<=
ival
&&
ival
<
NSMALLPOSINTS
)
{
/* save this one for a following allocation */
/* save this one for a following allocation */
...
...
Objects/listobject.c
Dosyayı görüntüle @
bffd683f
...
@@ -88,7 +88,7 @@ PyList_New(size)
...
@@ -88,7 +88,7 @@ PyList_New(size)
op
->
ob_size
=
size
;
op
->
ob_size
=
size
;
for
(
i
=
0
;
i
<
size
;
i
++
)
for
(
i
=
0
;
i
<
size
;
i
++
)
op
->
ob_item
[
i
]
=
NULL
;
op
->
ob_item
[
i
]
=
NULL
;
_Py_NewReference
(
op
);
_Py_NewReference
(
(
PyObject
*
)
op
);
return
(
PyObject
*
)
op
;
return
(
PyObject
*
)
op
;
}
}
...
...
Objects/methodobject.c
Dosyayı görüntüle @
bffd683f
...
@@ -47,7 +47,7 @@ PyCFunction_New(ml, self)
...
@@ -47,7 +47,7 @@ PyCFunction_New(ml, self)
if
(
op
!=
NULL
)
{
if
(
op
!=
NULL
)
{
free_list
=
(
PyCFunctionObject
*
)(
op
->
m_self
);
free_list
=
(
PyCFunctionObject
*
)(
op
->
m_self
);
op
->
ob_type
=
&
PyCFunction_Type
;
op
->
ob_type
=
&
PyCFunction_Type
;
_Py_NewReference
(
op
);
_Py_NewReference
(
(
PyObject
*
)
op
);
}
}
else
{
else
{
op
=
PyObject_NEW
(
PyCFunctionObject
,
&
PyCFunction_Type
);
op
=
PyObject_NEW
(
PyCFunctionObject
,
&
PyCFunction_Type
);
...
...
Objects/object.c
Dosyayı görüntüle @
bffd683f
...
@@ -34,7 +34,7 @@ PERFORMANCE OF THIS SOFTWARE.
...
@@ -34,7 +34,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "Python.h"
#include "Python.h"
#if defined( Py_TRACE_REFS ) || defined( Py_REF_DEBUG )
#if defined( Py_TRACE_REFS ) || defined( Py_REF_DEBUG )
long
_Py_RefTotal
;
DL_IMPORT
(
long
)
_Py_RefTotal
;
#endif
#endif
/* Object allocation routines used by NEWOBJ and NEWVAROBJ macros.
/* Object allocation routines used by NEWOBJ and NEWVAROBJ macros.
...
@@ -149,7 +149,7 @@ _PyObject_NewVar(tp, size, op)
...
@@ -149,7 +149,7 @@ _PyObject_NewVar(tp, size, op)
return
(
PyVarObject
*
)
PyErr_NoMemory
();
return
(
PyVarObject
*
)
PyErr_NoMemory
();
op
->
ob_type
=
tp
;
op
->
ob_type
=
tp
;
op
->
ob_size
=
size
;
op
->
ob_size
=
size
;
_Py_NewReference
(
op
);
_Py_NewReference
(
(
PyObject
*
)
op
);
return
op
;
return
op
;
}
}
...
@@ -651,7 +651,9 @@ void
...
@@ -651,7 +651,9 @@ void
_Py_ForgetReference
(
op
)
_Py_ForgetReference
(
op
)
register
PyObject
*
op
;
register
PyObject
*
op
;
{
{
#ifdef SLOW_UNREF_CHECK
register
PyObject
*
p
;
register
PyObject
*
p
;
#endif
if
(
op
->
ob_refcnt
<
0
)
if
(
op
->
ob_refcnt
<
0
)
Py_FatalError
(
"UNREF negative refcnt"
);
Py_FatalError
(
"UNREF negative refcnt"
);
if
(
op
==
&
refchain
||
if
(
op
==
&
refchain
||
...
...
Objects/stringobject.c
Dosyayı görüntüle @
bffd683f
...
@@ -104,7 +104,7 @@ PyString_FromStringAndSize(str, size)
...
@@ -104,7 +104,7 @@ PyString_FromStringAndSize(str, size)
#ifdef INTERN_STRINGS
#ifdef INTERN_STRINGS
op
->
ob_sinterned
=
NULL
;
op
->
ob_sinterned
=
NULL
;
#endif
#endif
_Py_NewReference
(
op
);
_Py_NewReference
(
(
PyObject
*
)
op
);
if
(
str
!=
NULL
)
if
(
str
!=
NULL
)
memcpy
(
op
->
ob_sval
,
str
,
size
);
memcpy
(
op
->
ob_sval
,
str
,
size
);
op
->
ob_sval
[
size
]
=
'\0'
;
op
->
ob_sval
[
size
]
=
'\0'
;
...
@@ -154,7 +154,7 @@ PyString_FromString(str)
...
@@ -154,7 +154,7 @@ PyString_FromString(str)
#ifdef INTERN_STRINGS
#ifdef INTERN_STRINGS
op
->
ob_sinterned
=
NULL
;
op
->
ob_sinterned
=
NULL
;
#endif
#endif
_Py_NewReference
(
op
);
_Py_NewReference
(
(
PyObject
*
)
op
);
strcpy
(
op
->
ob_sval
,
str
);
strcpy
(
op
->
ob_sval
,
str
);
#ifndef DONT_SHARE_SHORT_STRINGS
#ifndef DONT_SHARE_SHORT_STRINGS
if
(
size
==
0
)
{
if
(
size
==
0
)
{
...
@@ -317,7 +317,7 @@ string_concat(a, bb)
...
@@ -317,7 +317,7 @@ string_concat(a, bb)
#ifdef INTERN_STRINGS
#ifdef INTERN_STRINGS
op
->
ob_sinterned
=
NULL
;
op
->
ob_sinterned
=
NULL
;
#endif
#endif
_Py_NewReference
(
op
);
_Py_NewReference
(
(
PyObject
*
)
op
);
memcpy
(
op
->
ob_sval
,
a
->
ob_sval
,
(
int
)
a
->
ob_size
);
memcpy
(
op
->
ob_sval
,
a
->
ob_sval
,
(
int
)
a
->
ob_size
);
memcpy
(
op
->
ob_sval
+
a
->
ob_size
,
b
->
ob_sval
,
(
int
)
b
->
ob_size
);
memcpy
(
op
->
ob_sval
+
a
->
ob_size
,
b
->
ob_sval
,
(
int
)
b
->
ob_size
);
op
->
ob_sval
[
size
]
=
'\0'
;
op
->
ob_sval
[
size
]
=
'\0'
;
...
@@ -352,7 +352,7 @@ string_repeat(a, n)
...
@@ -352,7 +352,7 @@ string_repeat(a, n)
#ifdef INTERN_STRINGS
#ifdef INTERN_STRINGS
op
->
ob_sinterned
=
NULL
;
op
->
ob_sinterned
=
NULL
;
#endif
#endif
_Py_NewReference
(
op
);
_Py_NewReference
(
(
PyObject
*
)
op
);
for
(
i
=
0
;
i
<
size
;
i
+=
a
->
ob_size
)
for
(
i
=
0
;
i
<
size
;
i
+=
a
->
ob_size
)
memcpy
(
op
->
ob_sval
+
i
,
a
->
ob_sval
,
(
int
)
a
->
ob_size
);
memcpy
(
op
->
ob_sval
+
i
,
a
->
ob_sval
,
(
int
)
a
->
ob_size
);
op
->
ob_sval
[
size
]
=
'\0'
;
op
->
ob_sval
[
size
]
=
'\0'
;
...
...
Objects/tupleobject.c
Dosyayı görüntüle @
bffd683f
...
@@ -100,7 +100,7 @@ PyTuple_New(size)
...
@@ -100,7 +100,7 @@ PyTuple_New(size)
}
}
for
(
i
=
0
;
i
<
size
;
i
++
)
for
(
i
=
0
;
i
<
size
;
i
++
)
op
->
ob_item
[
i
]
=
NULL
;
op
->
ob_item
[
i
]
=
NULL
;
_Py_NewReference
(
op
);
_Py_NewReference
(
(
PyObject
*
)
op
);
#if MAXSAVESIZE > 0
#if MAXSAVESIZE > 0
if
(
size
==
0
)
{
if
(
size
==
0
)
{
free_tuples
[
0
]
=
op
;
free_tuples
[
0
]
=
op
;
...
@@ -452,7 +452,7 @@ _PyTuple_Resize(pv, newsize, last_is_sticky)
...
@@ -452,7 +452,7 @@ _PyTuple_Resize(pv, newsize, last_is_sticky)
#ifdef Py_REF_DEBUG
#ifdef Py_REF_DEBUG
--
_Py_RefTotal
;
--
_Py_RefTotal
;
#endif
#endif
_Py_ForgetReference
(
v
);
_Py_ForgetReference
(
(
PyObject
*
)
v
);
if
(
last_is_sticky
&&
sizediff
<
0
)
{
if
(
last_is_sticky
&&
sizediff
<
0
)
{
/* shrinking:
/* shrinking:
move entries to the front and zero moved entries */
move entries to the front and zero moved entries */
...
@@ -475,7 +475,7 @@ _PyTuple_Resize(pv, newsize, last_is_sticky)
...
@@ -475,7 +475,7 @@ _PyTuple_Resize(pv, newsize, last_is_sticky)
PyErr_NoMemory
();
PyErr_NoMemory
();
return
-
1
;
return
-
1
;
}
}
_Py_NewReference
(
sv
);
_Py_NewReference
(
(
PyObject
*
)
sv
);
for
(
i
=
sv
->
ob_size
;
i
<
newsize
;
i
++
)
for
(
i
=
sv
->
ob_size
;
i
<
newsize
;
i
++
)
sv
->
ob_item
[
i
]
=
NULL
;
sv
->
ob_item
[
i
]
=
NULL
;
if
(
last_is_sticky
&&
sizediff
>
0
)
{
if
(
last_is_sticky
&&
sizediff
>
0
)
{
...
...
PC/config.h
Dosyayı görüntüle @
bffd683f
...
@@ -61,6 +61,8 @@ you must define MS_NO_COREDLL (do not test this macro) */
...
@@ -61,6 +61,8 @@ you must define MS_NO_COREDLL (do not test this macro) */
#ifdef _M_IX86
#ifdef _M_IX86
#define COMPILER "[MSC 32 bit (Intel)]"
#define COMPILER "[MSC 32 bit (Intel)]"
#elif defined(_M_ALPHA)
#define COMPILER "[MSC 32 bit (Alpha)]"
#else
#else
#define COMPILER "[MSC (Unknown)]"
#define COMPILER "[MSC (Unknown)]"
#endif
#endif
...
@@ -213,13 +215,16 @@ typedef int pid_t;
...
@@ -213,13 +215,16 @@ typedef int pid_t;
#ifndef USE_DL_EXPORT
#ifndef USE_DL_EXPORT
/* So nobody needs to specify the .lib in their Makefile any more */
/* So nobody needs to specify the .lib in their Makefile any more */
#ifdef _DEBUG
#ifdef _DEBUG
#define Py_DEBUG
#pragma comment(lib,"python15_d.lib")
#pragma comment(lib,"python15_d.lib")
#else
#else
#pragma comment(lib,"python15.lib")
#pragma comment(lib,"python15.lib")
#endif
#endif
#endif
/* USE_DL_EXPORT */
#endif
/* USE_DL_EXPORT */
#ifdef _DEBUG
#define Py_DEBUG
#endif
#define SIZEOF_INT 4
#define SIZEOF_INT 4
#define SIZEOF_LONG 4
#define SIZEOF_LONG 4
#define SIZEOF_LONG_LONG 8
#define SIZEOF_LONG_LONG 8
...
...
Python/pythonrun.c
Dosyayı görüntüle @
bffd683f
...
@@ -72,6 +72,10 @@ static void initsigs Py_PROTO((void));
...
@@ -72,6 +72,10 @@ static void initsigs Py_PROTO((void));
static
void
call_sys_exitfunc
Py_PROTO
((
void
));
static
void
call_sys_exitfunc
Py_PROTO
((
void
));
static
void
call_ll_exitfuncs
Py_PROTO
((
void
));
static
void
call_ll_exitfuncs
Py_PROTO
((
void
));
#ifdef Py_TRACE_REFS
int
_Py_AskYesNo
(
char
*
prompt
);
#endif
int
Py_DebugFlag
;
/* Needed by parser.c */
int
Py_DebugFlag
;
/* Needed by parser.c */
int
Py_VerboseFlag
;
/* Needed by import.c */
int
Py_VerboseFlag
;
/* Needed by import.c */
int
Py_InteractiveFlag
;
/* Needed by Py_FdIsInteractive() below */
int
Py_InteractiveFlag
;
/* Needed by Py_FdIsInteractive() below */
...
...
Python/thread_nt.h
Dosyayı görüntüle @
bffd683f
...
@@ -65,7 +65,7 @@ int PyThread_start_new_thread(void (*func)(void *), void *arg)
...
@@ -65,7 +65,7 @@ int PyThread_start_new_thread(void (*func)(void *), void *arg)
if
(
rv
!=
-
1
)
{
if
(
rv
!=
-
1
)
{
success
=
1
;
success
=
1
;
dprintf
((
"%ld: PyThread_start_new_thread succeeded: %ld
\n
"
,
PyThread_get_thread_ident
(),
aThreadId
));
dprintf
((
"%ld: PyThread_start_new_thread succeeded: %ld
\n
"
,
PyThread_get_thread_ident
(),
rv
));
}
}
return
success
;
return
success
;
...
...
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