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
681d79aa
Kaydet (Commit)
681d79aa
authored
Tem 18, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
keyword arguments and faster calls
üst
11a3f0c2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
24 deletions
+32
-24
bltinmodule.c
Python/bltinmodule.c
+10
-6
ceval.c
Python/ceval.c
+0
-0
compile.c
Python/compile.c
+0
-0
import.c
Python/import.c
+2
-2
marshal.c
Python/marshal.c
+13
-3
pythonrun.c
Python/pythonrun.c
+3
-10
traceback.c
Python/traceback.c
+4
-3
No files found.
Python/bltinmodule.c
Dosyayı görüntüle @
681d79aa
...
...
@@ -80,15 +80,20 @@ builtin_apply(self, args)
object
*
self
;
object
*
args
;
{
object
*
func
,
*
alist
;
object
*
func
,
*
alist
,
*
kwdict
=
NULL
;
if
(
!
newgetargs
(
args
,
"O
O:apply"
,
&
func
,
&
alis
t
))
if
(
!
newgetargs
(
args
,
"O
|OO:apply"
,
&
func
,
&
alist
,
&
kwdic
t
))
return
NULL
;
if
(
!
is_tupleobject
(
alist
))
{
if
(
alist
!=
NULL
&&
!
is_tupleobject
(
alist
))
{
err_setstr
(
TypeError
,
"apply() 2nd argument must be tuple"
);
return
NULL
;
}
return
call_object
(
func
,
alist
);
if
(
kwdict
!=
NULL
&&
!
is_dictobject
(
kwdict
))
{
err_setstr
(
TypeError
,
"apply() 3rd argument must be dictionary"
);
return
NULL
;
}
return
PyEval_CallObjectWithKeywords
(
func
,
alist
,
kwdict
);
}
static
object
*
...
...
@@ -373,8 +378,7 @@ builtin_eval(self, args)
return
NULL
;
}
if
(
is_codeobject
(
cmd
))
return
eval_code
((
codeobject
*
)
cmd
,
globals
,
locals
,
(
object
*
)
NULL
,
(
object
*
)
NULL
);
return
eval_code
((
codeobject
*
)
cmd
,
globals
,
locals
);
if
(
!
is_stringobject
(
cmd
))
{
err_setstr
(
TypeError
,
"eval() argument 1 must be string or code object"
);
...
...
Python/ceval.c
Dosyayı görüntüle @
681d79aa
This diff is collapsed.
Click to expand it.
Python/compile.c
Dosyayı görüntüle @
681d79aa
This diff is collapsed.
Click to expand it.
Python/import.c
Dosyayı görüntüle @
681d79aa
...
...
@@ -54,7 +54,7 @@ extern long getmtime(); /* In getmtime.c */
Apple MPW compiler swaps their values, botching string constants */
/* XXX Perhaps the magic number should be frozen and a version field
added to the .pyc file header? */
#define MAGIC (
0x4127L
| ((long)'\r'<<16) | ((long)'\n'<<24))
#define MAGIC (
11913
| ((long)'\r'<<16) | ((long)'\n'<<24))
object
*
import_modules
;
/* This becomes sys.modules */
...
...
@@ -159,7 +159,7 @@ exec_code_module(name, co)
if
(
dictinsert
(
d
,
"__builtins__"
,
getbuiltins
())
!=
0
)
return
NULL
;
}
v
=
eval_code
((
codeobject
*
)
co
,
d
,
d
,
d
,
(
object
*
)
NULL
);
v
=
eval_code
((
codeobject
*
)
co
,
d
,
d
);
/* XXX owner? */
if
(
v
==
NULL
)
return
NULL
;
DECREF
(
v
);
...
...
Python/marshal.c
Dosyayı görüntüle @
681d79aa
...
...
@@ -44,7 +44,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define TYPE_TUPLE '('
#define TYPE_LIST '['
#define TYPE_DICT '{'
#define TYPE_CODE '
C
'
#define TYPE_CODE '
c
'
#define TYPE_UNKNOWN '?'
typedef
struct
{
...
...
@@ -187,9 +187,13 @@ w_object(v, p)
else
if
(
is_codeobject
(
v
))
{
codeobject
*
co
=
(
codeobject
*
)
v
;
w_byte
(
TYPE_CODE
,
p
);
w_short
(
co
->
co_argcount
,
p
);
w_short
(
co
->
co_nlocals
,
p
);
w_short
(
co
->
co_flags
,
p
);
w_object
((
object
*
)
co
->
co_code
,
p
);
w_object
(
co
->
co_consts
,
p
);
w_object
(
co
->
co_names
,
p
);
w_object
(
co
->
co_varnames
,
p
);
w_object
(
co
->
co_filename
,
p
);
w_object
(
co
->
co_name
,
p
);
}
...
...
@@ -374,14 +378,20 @@ r_object(p)
case
TYPE_CODE
:
{
int
argcount
=
r_short
(
p
);
int
nlocals
=
r_short
(
p
);
int
flags
=
r_short
(
p
);
object
*
code
=
r_object
(
p
);
object
*
consts
=
r_object
(
p
);
object
*
names
=
r_object
(
p
);
object
*
varnames
=
r_object
(
p
);
object
*
filename
=
r_object
(
p
);
object
*
name
=
r_object
(
p
);
if
(
!
err_occurred
())
{
v
=
(
object
*
)
newcodeobject
(
code
,
consts
,
names
,
filename
,
name
);
v
=
(
object
*
)
newcodeobject
(
argcount
,
nlocals
,
flags
,
code
,
consts
,
names
,
varnames
,
filename
,
name
);
}
else
v
=
NULL
;
...
...
Python/pythonrun.c
Dosyayı görüntüle @
681d79aa
...
...
@@ -430,7 +430,7 @@ run_node(n, filename, globals, locals)
freetree
(
n
);
if
(
co
==
NULL
)
return
NULL
;
v
=
eval_code
(
co
,
globals
,
locals
,
(
object
*
)
NULL
,
(
object
*
)
NULL
);
v
=
eval_code
(
co
,
globals
,
locals
);
DECREF
(
co
);
return
v
;
}
...
...
@@ -462,7 +462,7 @@ run_pyc_file(fp, filename, globals, locals)
return
NULL
;
}
co
=
(
codeobject
*
)
v
;
v
=
eval_code
(
co
,
globals
,
locals
,
(
object
*
)
NULL
,
(
object
*
)
NULL
);
v
=
eval_code
(
co
,
globals
,
locals
);
DECREF
(
co
);
return
v
;
}
...
...
@@ -603,16 +603,9 @@ cleanup()
object
*
exitfunc
=
sysget
(
"exitfunc"
);
if
(
exitfunc
)
{
object
*
arg
;
object
*
res
;
sysset
(
"exitfunc"
,
(
object
*
)
NULL
);
arg
=
newtupleobject
(
0
);
if
(
arg
==
NULL
)
res
=
NULL
;
else
{
res
=
call_object
(
exitfunc
,
arg
);
DECREF
(
arg
);
}
res
=
call_object
(
exitfunc
,
(
object
*
)
NULL
);
if
(
res
==
NULL
)
{
fprintf
(
stderr
,
"Error in sys.exitfunc:
\n
"
);
print_error
();
...
...
Python/traceback.c
Dosyayı görüntüle @
681d79aa
...
...
@@ -68,7 +68,10 @@ tb_dealloc(tb)
DEL
(
tb
);
}
static
typeobject
Tracebacktype
=
{
#define Tracebacktype PyTraceback_Type
#define is_tracebackobject PyTraceback_Check
typeobject
Tracebacktype
=
{
OB_HEAD_INIT
(
&
Typetype
)
0
,
"traceback"
,
...
...
@@ -85,8 +88,6 @@ static typeobject Tracebacktype = {
0
,
/*tp_as_mapping*/
};
#define is_tracebackobject(v) ((v)->ob_type == &Tracebacktype)
static
tracebackobject
*
newtracebackobject
(
next
,
frame
,
lasti
,
lineno
)
tracebackobject
*
next
;
...
...
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