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
0b2d4ab6
Commit
0b2d4ab6
authored
Nov 09, 2018
by
Michael Droettboom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix iodide/#1151: PyDict_GetItem returns a borrowed reference
parent
9093723b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
src/pyimport.c
src/pyimport.c
+0
-1
src/python2js.c
src/python2js.c
+0
-1
test/test_python.py
test/test_python.py
+7
-0
No files found.
src/pyimport.c
View file @
0b2d4ab6
...
...
@@ -19,7 +19,6 @@ _pyimport(char* name)
Py_DECREF
(
pyname
);
int
idval
=
python2js
(
pyval
);
Py_DECREF
(
pyval
);
return
idval
;
}
...
...
src/python2js.c
View file @
0b2d4ab6
...
...
@@ -297,7 +297,6 @@ _python2js_cache(PyObject* x, PyObject* map)
if
(
result
!=
HW_ERROR
)
{
result
=
hiwire_incref
(
result
);
}
Py_DECREF
(
val
);
}
else
{
result
=
_python2js
(
x
,
map
);
}
...
...
test/test_python.py
View file @
0b2d4ab6
...
...
@@ -183,6 +183,13 @@ def test_import_js(selenium):
assert
result
==
'Foo'
def
test_pyimport_multiple
(
selenium
):
"""See #1151"""
selenium
.
run
(
"v = 0.123"
)
selenium
.
run_js
(
"pyodide.pyimport('v')"
)
selenium
.
run_js
(
"pyodide.pyimport('v')"
)
def
test_pyproxy
(
selenium
):
selenium
.
run
(
"""
...
...
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