Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ExtensionClass-2.13.2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
ExtensionClass-2.13.2
Commits
4610d3b8
Commit
4610d3b8
authored
Nov 09, 2016
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow ExtensionClass change the im_self of PyMethodObject in Pyston
parent
8d1f1650
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
src/ExtensionClass/_ExtensionClass.c
src/ExtensionClass/_ExtensionClass.c
+13
-12
No files found.
src/ExtensionClass/_ExtensionClass.c
View file @
4610d3b8
...
...
@@ -925,18 +925,19 @@ PyECMethod_New_(PyObject *callable, PyObject *inst)
if
(
PyMethod_Check
(
callable
))
{
// if (callable->ob_refcnt == 1)
// {
// Pyston change:
// Py_XDECREF(((PyMethodObject*)callable)->im_self);
// Py_XDECREF(PyMethod_Self((PyObject *)callable));
// Py_INCREF(inst);
// ((PyMethodObject*)callable)->im_self = inst;
// PyMethod_Self((PyObject *)callable) = inst;
// Py_INCREF(callable);
// return callable;
// }
// else
if
(
callable
->
ob_refcnt
==
1
)
{
// Pyston change: use new PyMethod_SetSelf API to do this
// in Pyston.
/* Py_XDECREF(((PyMethodObject*)callable)->im_self); */
/* Py_INCREF(inst); */
/* ((PyMethodObject*)callable)->im_self = inst; */
/* Py_INCREF(callable); */
/* return callable; */
PyMethod_SetSelf
(
callable
,
inst
);
return
callable
;
}
else
// Pyston change:
return
callable
->
ob_type
->
tp_descr_get
(
callable
,
inst
,
...
...
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