Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
e0f83b2c
Commit
e0f83b2c
authored
Feb 15, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace some more Python string constants in utility code
parent
c0dded1d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
53 deletions
+6
-53
Cython/Utility/ObjectHandling.c
Cython/Utility/ObjectHandling.c
+6
-53
No files found.
Cython/Utility/ObjectHandling.c
View file @
e0f83b2c
...
@@ -495,7 +495,6 @@ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases,
...
@@ -495,7 +495,6 @@ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases,
PyObject
*
prep
;
PyObject
*
prep
;
PyObject
*
pargs
;
PyObject
*
pargs
;
PyObject
*
ns
;
PyObject
*
ns
;
PyObject
*
str
;
prep
=
PyObject_GetAttr
(
metaclass
,
PYIDENT
(
"__prepare__"
));
prep
=
PyObject_GetAttr
(
metaclass
,
PYIDENT
(
"__prepare__"
));
if
(
!
prep
)
{
if
(
!
prep
)
{
...
@@ -517,59 +516,13 @@ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases,
...
@@ -517,59 +516,13 @@ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases,
return
NULL
;
return
NULL
;
/* Required here to emulate assignment order */
/* Required here to emulate assignment order */
/* XXX: use consts here */
if
(
PyObject_SetItem
(
ns
,
PYIDENT
(
"__module__"
),
modname
)
<
0
)
goto
bad
;
#if PY_MAJOR_VERSION >= 3
if
(
PyObject_SetItem
(
ns
,
PYIDENT
(
"__qualname__"
),
qualname
)
<
0
)
goto
bad
;
str
=
PyUnicode_FromString
(
"__module__"
);
if
(
doc
&&
PyObject_SetItem
(
ns
,
PYIDENT
(
"__doc__"
),
doc
)
<
0
)
goto
bad
;
#else
return
ns
;
str
=
PyString_FromString
(
"__module__"
);
bad:
#endif
if
(
!
str
)
{
Py_DECREF
(
ns
);
return
NULL
;
}
if
(
PyObject_SetItem
(
ns
,
str
,
modname
)
<
0
)
{
Py_DECREF
(
ns
);
Py_DECREF
(
str
);
return
NULL
;
}
Py_DECREF
(
str
);
#if PY_MAJOR_VERSION >= 3
str
=
PyUnicode_FromString
(
"__qualname__"
);
#else
str
=
PyString_FromString
(
"__qualname__"
);
#endif
if
(
!
str
)
{
Py_DECREF
(
ns
);
return
NULL
;
}
if
(
PyObject_SetItem
(
ns
,
str
,
qualname
)
<
0
)
{
Py_DECREF
(
ns
);
Py_DECREF
(
str
);
return
NULL
;
}
Py_DECREF
(
str
);
if
(
doc
)
{
#if PY_MAJOR_VERSION >= 3
str
=
PyUnicode_FromString
(
"__doc__"
);
#else
str
=
PyString_FromString
(
"__doc__"
);
#endif
if
(
!
str
)
{
Py_DECREF
(
ns
);
return
NULL
;
}
if
(
PyObject_SetItem
(
ns
,
str
,
doc
)
<
0
)
{
Py_DECREF
(
ns
);
Py_DECREF
(
ns
);
Py_DECREF
(
str
);
return
NULL
;
return
NULL
;
}
Py_DECREF
(
str
);
}
return
ns
;
}
}
static
PyObject
*
__Pyx_Py3ClassCreate
(
PyObject
*
metaclass
,
PyObject
*
name
,
PyObject
*
bases
,
static
PyObject
*
__Pyx_Py3ClassCreate
(
PyObject
*
metaclass
,
PyObject
*
name
,
PyObject
*
bases
,
...
...
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