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
5639ba48
Kaydet (Commit)
5639ba48
authored
Tem 08, 2000
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ANSI-fy the sources.
üst
509d79ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
19 deletions
+16
-19
operator.c
Modules/operator.c
+16
-19
No files found.
Modules/operator.c
Dosyayı görüntüle @
5639ba48
...
@@ -69,42 +69,42 @@ used for special class methods; variants without leading and trailing\n\
...
@@ -69,42 +69,42 @@ used for special class methods; variants without leading and trailing\n\
#include "Python.h"
#include "Python.h"
#define spam1(OP,AOP) static PyObject *OP(
s,a) PyObject *s, *a;
{ \
#define spam1(OP,AOP) static PyObject *OP(
PyObject *s, PyObject *a)
{ \
PyObject *a1; \
PyObject *a1; \
if(! PyArg_ParseTuple(a,"O",&a1)) return NULL; \
if(! PyArg_ParseTuple(a,"O",&a1)) return NULL; \
return AOP(a1); }
return AOP(a1); }
#define spam2(OP,AOP) static PyObject *OP(
s,a) PyObject *s, *a;
{ \
#define spam2(OP,AOP) static PyObject *OP(
PyObject *s, PyObject *a)
{ \
PyObject *a1, *a2; \
PyObject *a1, *a2; \
if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \
if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \
return AOP(a1,a2); }
return AOP(a1,a2); }
#define spamoi(OP,AOP) static PyObject *OP(
s,a) PyObject *s, *a;
{ \
#define spamoi(OP,AOP) static PyObject *OP(
PyObject *s, PyObject *a)
{ \
PyObject *a1; int a2; \
PyObject *a1; int a2; \
if(! PyArg_ParseTuple(a,"Oi",&a1,&a2)) return NULL; \
if(! PyArg_ParseTuple(a,"Oi",&a1,&a2)) return NULL; \
return AOP(a1,a2); }
return AOP(a1,a2); }
#define spam2n(OP,AOP) static PyObject *OP(
s,a) PyObject *s, *a;
{ \
#define spam2n(OP,AOP) static PyObject *OP(
PyObject *s, PyObject *a)
{ \
PyObject *a1, *a2; \
PyObject *a1, *a2; \
if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \
if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \
if(-1 == AOP(a1,a2)) return NULL; \
if(-1 == AOP(a1,a2)) return NULL; \
Py_INCREF(Py_None); \
Py_INCREF(Py_None); \
return Py_None; }
return Py_None; }
#define spam3n(OP,AOP) static PyObject *OP(
s,a) PyObject *s, *a;
{ \
#define spam3n(OP,AOP) static PyObject *OP(
PyObject *s, PyObject *a)
{ \
PyObject *a1, *a2, *a3; \
PyObject *a1, *a2, *a3; \
if(! PyArg_ParseTuple(a,"OOO",&a1,&a2,&a3)) return NULL; \
if(! PyArg_ParseTuple(a,"OOO",&a1,&a2,&a3)) return NULL; \
if(-1 == AOP(a1,a2,a3)) return NULL; \
if(-1 == AOP(a1,a2,a3)) return NULL; \
Py_INCREF(Py_None); \
Py_INCREF(Py_None); \
return Py_None; }
return Py_None; }
#define spami(OP,AOP) static PyObject *OP(
s,a) PyObject *s, *a;
{ \
#define spami(OP,AOP) static PyObject *OP(
PyObject *s, PyObject *a)
{ \
PyObject *a1; long r; \
PyObject *a1; long r; \
if(! PyArg_ParseTuple(a,"O",&a1)) return NULL; \
if(! PyArg_ParseTuple(a,"O",&a1)) return NULL; \
if(-1 == (r=AOP(a1))) return NULL; \
if(-1 == (r=AOP(a1))) return NULL; \
return PyInt_FromLong(r); }
return PyInt_FromLong(r); }
#define spami2(OP,AOP) static PyObject *OP(
s,a) PyObject *s, *a;
{ \
#define spami2(OP,AOP) static PyObject *OP(
PyObject *s, PyObject *a)
{ \
PyObject *a1, *a2; long r; \
PyObject *a1, *a2; long r; \
if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \
if(! PyArg_ParseTuple(a,"OO",&a1,&a2)) return NULL; \
if(-1 == (r=AOP(a1,a2))) return NULL; \
if(-1 == (r=AOP(a1,a2))) return NULL; \
...
@@ -140,8 +140,7 @@ spam2n(op_delitem , PyObject_DelItem)
...
@@ -140,8 +140,7 @@ spam2n(op_delitem , PyObject_DelItem)
spam3n
(
op_setitem
,
PyObject_SetItem
)
spam3n
(
op_setitem
,
PyObject_SetItem
)
static
PyObject
*
static
PyObject
*
op_getslice
(
s
,
a
)
op_getslice
(
PyObject
*
s
,
PyObject
*
a
)
PyObject
*
s
,
*
a
;
{
{
PyObject
*
a1
;
PyObject
*
a1
;
int
a2
,
a3
;
int
a2
,
a3
;
...
@@ -152,8 +151,7 @@ op_getslice(s,a)
...
@@ -152,8 +151,7 @@ op_getslice(s,a)
}
}
static
PyObject
*
static
PyObject
*
op_setslice
(
s
,
a
)
op_setslice
(
PyObject
*
s
,
PyObject
*
a
)
PyObject
*
s
,
*
a
;
{
{
PyObject
*
a1
,
*
a4
;
PyObject
*
a1
,
*
a4
;
int
a2
,
a3
;
int
a2
,
a3
;
...
@@ -169,8 +167,7 @@ op_setslice(s,a)
...
@@ -169,8 +167,7 @@ op_setslice(s,a)
}
}
static
PyObject
*
static
PyObject
*
op_delslice
(
s
,
a
)
op_delslice
(
PyObject
*
s
,
PyObject
*
a
)
PyObject
*
s
,
*
a
;
{
{
PyObject
*
a1
;
PyObject
*
a1
;
int
a2
,
a3
;
int
a2
,
a3
;
...
@@ -188,13 +185,13 @@ op_delslice(s,a)
...
@@ -188,13 +185,13 @@ op_delslice(s,a)
#undef spam1
#undef spam1
#undef spam2
#undef spam2
#ifdef HAVE_OLD_CPP
#ifdef HAVE_OLD_CPP
#define spam1(OP,DOC) {"OP", OP,
1
, DOC},
#define spam1(OP,DOC) {"OP", OP,
METH_VARARGS
, DOC},
#define spam2(OP,ALTOP,DOC) {"OP", op_
/**/
OP,
1
, DOC}, \
#define spam2(OP,ALTOP,DOC) {"OP", op_
/**/
OP,
METH_VARARGS
, DOC}, \
{"ALTOP", op_
/**/
OP,
1
, DOC},
{"ALTOP", op_
/**/
OP,
METH_VARARGS
, DOC},
#else
#else
#define spam1(OP,DOC) {#OP, OP,
1
, DOC},
#define spam1(OP,DOC) {#OP, OP,
METH_VARARGS
, DOC},
#define spam2(OP,ALTOP,DOC) {#OP, op_##OP,
1
, DOC}, \
#define spam2(OP,ALTOP,DOC) {#OP, op_##OP,
METH_VARARGS
, DOC}, \
{#ALTOP, op_##OP,
1
, DOC},
{#ALTOP, op_##OP,
METH_VARARGS
, DOC},
#endif
#endif
static
struct
PyMethodDef
operator_methods
[]
=
{
static
struct
PyMethodDef
operator_methods
[]
=
{
...
...
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