Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyodide
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
pyodide
Commits
5b84311d
Commit
5b84311d
authored
Sep 27, 2018
by
Michael Droettboom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Just use pointer to bound method name, since we keep object around, it shouldn't die
parent
dda6557b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
src/jsproxy.c
src/jsproxy.c
+2
-4
No files found.
src/jsproxy.c
View file @
5b84311d
...
@@ -416,12 +416,10 @@ JsProxy_cnew(int idobj)
...
@@ -416,12 +416,10 @@ JsProxy_cnew(int idobj)
//
//
// A special class for bound methods
// A special class for bound methods
const
size_t
BOUND_METHOD_NAME_SIZE
=
256
;
typedef
struct
typedef
struct
{
{
PyObject_HEAD
int
this_
;
PyObject_HEAD
int
this_
;
c
har
name
[
BOUND_METHOD_NAME_SIZE
]
;
c
onst
char
*
name
;
}
JsBoundMethod
;
}
JsBoundMethod
;
static
void
static
void
...
@@ -469,7 +467,7 @@ JsBoundMethod_cnew(int this_, const char* name)
...
@@ -469,7 +467,7 @@ JsBoundMethod_cnew(int this_, const char* name)
JsBoundMethod
*
self
;
JsBoundMethod
*
self
;
self
=
(
JsBoundMethod
*
)
JsBoundMethodType
.
tp_alloc
(
&
JsBoundMethodType
,
0
);
self
=
(
JsBoundMethod
*
)
JsBoundMethodType
.
tp_alloc
(
&
JsBoundMethodType
,
0
);
self
->
this_
=
hiwire_incref
(
this_
);
self
->
this_
=
hiwire_incref
(
this_
);
s
trncpy
(
self
->
name
,
name
,
BOUND_METHOD_NAME_SIZE
)
;
s
elf
->
name
=
name
;
return
(
PyObject
*
)
self
;
return
(
PyObject
*
)
self
;
}
}
...
...
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