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
d783a46d
Kaydet (Commit)
d783a46d
authored
Haz 07, 1991
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
printobject now returns an error code
üst
90933610
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
9 deletions
+14
-9
object.h
Include/object.h
+2
-2
stdwinmodule.c
Modules/stdwinmodule.c
+2
-1
pythonmain.c
Python/pythonmain.c
+4
-2
traceback.c
Python/traceback.c
+6
-4
No files found.
Include/object.h
Dosyayı görüntüle @
d783a46d
...
@@ -162,7 +162,7 @@ typedef struct _typeobject {
...
@@ -162,7 +162,7 @@ typedef struct _typeobject {
/* Methods to implement standard operations */
/* Methods to implement standard operations */
void
(
*
tp_dealloc
)
FPROTO
((
object
*
));
void
(
*
tp_dealloc
)
FPROTO
((
object
*
));
void
(
*
tp_print
)
FPROTO
((
object
*
,
FILE
*
,
int
));
int
(
*
tp_print
)
FPROTO
((
object
*
,
FILE
*
,
int
));
object
*
(
*
tp_getattr
)
FPROTO
((
object
*
,
char
*
));
object
*
(
*
tp_getattr
)
FPROTO
((
object
*
,
char
*
));
int
(
*
tp_setattr
)
FPROTO
((
object
*
,
char
*
,
object
*
));
int
(
*
tp_setattr
)
FPROTO
((
object
*
,
char
*
,
object
*
));
int
(
*
tp_compare
)
FPROTO
((
object
*
,
object
*
));
int
(
*
tp_compare
)
FPROTO
((
object
*
,
object
*
));
...
@@ -180,7 +180,7 @@ extern typeobject Typetype; /* The type of type objects */
...
@@ -180,7 +180,7 @@ extern typeobject Typetype; /* The type of type objects */
#define is_typeobject(op) ((op)->ob_type == &Typetype)
#define is_typeobject(op) ((op)->ob_type == &Typetype)
/* Generic operations on objects */
/* Generic operations on objects */
extern
void
printobject
PROTO
((
object
*
,
FILE
*
,
int
));
extern
int
printobject
PROTO
((
object
*
,
FILE
*
,
int
));
extern
object
*
reprobject
PROTO
((
object
*
));
extern
object
*
reprobject
PROTO
((
object
*
));
extern
int
cmpobject
PROTO
((
object
*
,
object
*
));
extern
int
cmpobject
PROTO
((
object
*
,
object
*
));
extern
object
*
getattr
PROTO
((
object
*
,
char
*
));
extern
object
*
getattr
PROTO
((
object
*
,
char
*
));
...
...
Modules/stdwinmodule.c
Dosyayı görüntüle @
d783a46d
...
@@ -1286,13 +1286,14 @@ window_dealloc(wp)
...
@@ -1286,13 +1286,14 @@ window_dealloc(wp)
free
((
char
*
)
wp
);
free
((
char
*
)
wp
);
}
}
static
void
static
int
window_print
(
wp
,
fp
,
flags
)
window_print
(
wp
,
fp
,
flags
)
windowobject
*
wp
;
windowobject
*
wp
;
FILE
*
fp
;
FILE
*
fp
;
int
flags
;
int
flags
;
{
{
fprintf
(
fp
,
"<window titled '%s'>"
,
getstringvalue
(
wp
->
w_title
));
fprintf
(
fp
,
"<window titled '%s'>"
,
getstringvalue
(
wp
->
w_title
));
return
0
;
}
}
static
object
*
static
object
*
...
...
Python/pythonmain.c
Dosyayı görüntüle @
d783a46d
...
@@ -289,10 +289,12 @@ print_error()
...
@@ -289,10 +289,12 @@ print_error()
object
*
exception
,
*
v
;
object
*
exception
,
*
v
;
err_get
(
&
exception
,
&
v
);
err_get
(
&
exception
,
&
v
);
fprintf
(
stderr
,
"Unhandled exception: "
);
fprintf
(
stderr
,
"Unhandled exception: "
);
printobject
(
exception
,
stderr
,
PRINT_RAW
);
if
(
printobject
(
exception
,
stderr
,
PRINT_RAW
)
!=
0
)
err_clear
();
if
(
v
!=
NULL
&&
v
!=
None
)
{
if
(
v
!=
NULL
&&
v
!=
None
)
{
fprintf
(
stderr
,
": "
);
fprintf
(
stderr
,
": "
);
printobject
(
v
,
stderr
,
PRINT_RAW
);
if
(
printobject
(
v
,
stderr
,
PRINT_RAW
)
!=
0
)
err_clear
();
}
}
fprintf
(
stderr
,
"
\n
"
);
fprintf
(
stderr
,
"
\n
"
);
XDECREF
(
exception
);
XDECREF
(
exception
);
...
...
Python/traceback.c
Dosyayı görüntüle @
d783a46d
...
@@ -186,12 +186,14 @@ tb_printinternal(tb, fp)
...
@@ -186,12 +186,14 @@ tb_printinternal(tb, fp)
FILE
*
fp
;
FILE
*
fp
;
{
{
while
(
tb
!=
NULL
)
{
while
(
tb
!=
NULL
)
{
if
(
intrcheck
())
{
if
(
intrcheck
())
fprintf
(
fp
,
"[interrupted]
\n
"
);
break
;
break
;
}
fprintf
(
fp
,
" File
\"
"
);
fprintf
(
fp
,
" File
\"
"
);
printobject
(
tb
->
tb_frame
->
f_code
->
co_filename
,
fp
,
PRINT_RAW
);
if
(
printobject
(
tb
->
tb_frame
->
f_code
->
co_filename
,
fp
,
PRINT_RAW
)
!=
0
)
{
err_clear
();
break
;
}
fprintf
(
fp
,
"
\"
, line %d
\n
"
,
tb
->
tb_lineno
);
fprintf
(
fp
,
"
\"
, line %d
\n
"
,
tb
->
tb_lineno
);
tb_displayline
(
fp
,
tb_displayline
(
fp
,
getstringvalue
(
tb
->
tb_frame
->
f_code
->
co_filename
),
getstringvalue
(
tb
->
tb_frame
->
f_code
->
co_filename
),
...
...
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