Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
S
scom
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ç
SulinOS
scom
Commits
3a4b53fb
Kaydet (Commit)
3a4b53fb
authored
May 31, 2007
tarafından
Gürer Özen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Gönderilen parametreyi fonksiyon istemiyorsa verme.
üst
b5ca0b44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
csl.c
comar/src/csl.c
+17
-4
No files found.
comar/src/csl.c
Dosyayı görüntüle @
3a4b53fb
/*
** Copyright (c) 2005-200
6
, TUBITAK/UEKAE
** Copyright (c) 2005-200
7
, TUBITAK/UEKAE
**
** This program is free software; you can redistribute it and/or modify it
** under the terms of the GNU General Public License as published by the
...
...
@@ -398,6 +398,8 @@ csl_execute(char *code, size_t size, const char *func_name, struct pack *pak, ch
PyObject
*
pArgs
,
*
pkArgs
;
PyMethodDef
*
meth
;
node
*
n
;
int
arg_count
;
PyObject
*
argNames
;
pModule
=
PyImport_AddModule
(
"__builtin__"
);
pDict
=
PyModule_GetDict
(
pModule
);
...
...
@@ -444,9 +446,17 @@ csl_execute(char *code, size_t size, const char *func_name, struct pack *pak, ch
return
CSL_NOFUNC
;
}
{
PyObject
*
tempCode
,
*
temp
;
tempCode
=
PyObject_GetAttrString
(
pFunc
,
"func_code"
);
temp
=
PyObject_GetAttrString
(
tempCode
,
"co_argcount"
);
arg_count
=
PyInt_AsLong
(
temp
);
argNames
=
PyObject_GetAttrString
(
tempCode
,
"co_varnames"
);
}
pArgs
=
NULL
;
pkArgs
=
PyDict_New
();
while
(
pak
)
{
while
(
arg_count
&&
pak
)
{
PyObject
*
p
;
char
*
t
,
*
t2
;
size_t
sz
;
...
...
@@ -457,8 +467,11 @@ csl_execute(char *code, size_t size, const char *func_name, struct pack *pak, ch
Py_DECREF
(
pkArgs
);
break
;
}
p
=
PyString_FromStringAndSize
(
t2
,
sz
);
PyDict_SetItemString
(
pkArgs
,
t
,
p
);
p
=
PyString_FromString
(
t
);
if
(
PySequence_Contains
(
argNames
,
p
)
==
1
)
{
p
=
PyString_FromStringAndSize
(
t2
,
sz
);
PyDict_SetItemString
(
pkArgs
,
t
,
p
);
}
}
if
(
!
pArgs
)
pArgs
=
PyTuple_New
(
0
);
...
...
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