Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(41)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Delta Between Two Patch Sets: Objects/methodobject.c

Issue 160063: LOAD_METHOD/CALL_METHOD: Avoid allocating bound methods when possible (Closed)
Left Patch Set: Small cleanups Created 15 years, 7 months ago
Right Patch Set: Merge w/ trunk, fix test_profile Created 15 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Objects/descrobject.c ('k') | Objects/object.c » ('j') | no next file with change/comment »
('i') | ('e') | ('c') | ('s')
LEFTRIGHT
1 1
2 /* Method object implementation */ 2 /* Method object implementation */
3 3
4 #include "Python.h" 4 #include "Python.h"
5 #include "structmember.h" 5 #include "structmember.h"
6 6
7 /* Free list for method objects to safe malloc/free overhead 7 /* Free list for method objects to safe malloc/free overhead
8 * The m_self element is used to chain the objects. 8 * The m_self element is used to chain the objects.
9 */ 9 */
10 static PyCFunctionObject *free_list = NULL; 10 static PyCFunctionObject *free_list = NULL;
(...skipping 86 matching lines...) | | Loading...
97 } 97 }
98 98
99 int 99 int
100 PyCFunction_GetFlags(PyObject *op) 100 PyCFunction_GetFlags(PyObject *op)
101 { 101 {
102 if (!PyCFunction_Check(op)) { 102 if (!PyCFunction_Check(op)) {
103 PyErr_BadInternalCall(); 103 PyErr_BadInternalCall();
104 return -1; 104 return -1;
105 } 105 }
106 return ((PyCFunctionObject *)op) -> m_ml -> ml_flags; 106 return ((PyCFunctionObject *)op) -> m_ml -> ml_flags;
107 }
108
109 PyObject *
110 PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw)
111 {
112 return PyMethodDef_Call(PyCFunction_GET_METHODDEF(func),
113 PyCFunction_GET_SELF(func), arg, kw);
107 } 114 }
108 115
109 PyObject * 116 PyObject *
110 PyMethodDef_Call(PyMethodDef *ml, PyObject *self, PyObject *arg, PyObject *kw) 117 PyMethodDef_Call(PyMethodDef *ml, PyObject *self, PyObject *arg, PyObject *kw)
111 { 118 {
112 PyCFunction meth = ml->ml_meth; 119 PyCFunction meth = ml->ml_meth;
113 Py_ssize_t size; 120 Py_ssize_t size;
114 121
115 switch (ml->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) { 122 switch (ml->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
116 case METH_VARARGS: 123 case METH_VARARGS:
(...skipping 359 matching lines...) | | Loading...
476 */ 483 */
477 484
478 #undef PyCFunction_New 485 #undef PyCFunction_New
479 PyAPI_FUNC(PyObject *) PyCFunction_New(PyMethodDef *, PyObject *); 486 PyAPI_FUNC(PyObject *) PyCFunction_New(PyMethodDef *, PyObject *);
480 487
481 PyObject * 488 PyObject *
482 PyCFunction_New(PyMethodDef *ml, PyObject *self) 489 PyCFunction_New(PyMethodDef *ml, PyObject *self)
483 { 490 {
484 return PyCFunction_NewEx(ml, self, NULL); 491 return PyCFunction_NewEx(ml, self, NULL);
485 } 492 }
LEFTRIGHT
« Objects/descrobject.c ('k') | Objects/object.c » ('j') | ('i') | ('e') | ('c') | ('s')
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /