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)
...
@@ -925,18 +925,19 @@ PyECMethod_New_(PyObject *callable, PyObject *inst)
if
(
PyMethod_Check
(
callable
))
if
(
PyMethod_Check
(
callable
))
{
{
// if (callable->ob_refcnt == 1)
if
(
callable
->
ob_refcnt
==
1
)
// {
{
// Pyston change:
// Pyston change: use new PyMethod_SetSelf API to do this
// Py_XDECREF(((PyMethodObject*)callable)->im_self);
// in Pyston.
// Py_XDECREF(PyMethod_Self((PyObject *)callable));
/* Py_XDECREF(((PyMethodObject*)callable)->im_self); */
// Py_INCREF(inst);
/* Py_INCREF(inst); */
// ((PyMethodObject*)callable)->im_self = inst;
/* ((PyMethodObject*)callable)->im_self = inst; */
// PyMethod_Self((PyObject *)callable) = inst;
/* Py_INCREF(callable); */
// Py_INCREF(callable);
/* return callable; */
// return callable;
PyMethod_SetSelf
(
callable
,
inst
);
// }
return
callable
;
// else
}
else
// Pyston change:
// Pyston change:
return
callable
->
ob_type
->
tp_descr_get
(
return
callable
->
ob_type
->
tp_descr_get
(
callable
,
inst
,
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