Skip to content

Commit

Permalink
fix #92
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Oct 13, 2014
1 parent 7a930c9 commit 798d757
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/conversions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ type PyVector{T} <: AbstractVector{T}
end

PyVector(o::PyObject) = PyVector{PyAny}(o)
PyObject(a::PyVector) = a.o
convert(::Type{PyVector}, o::PyObject) = PyVector(o)
convert{T}(::Type{PyVector{T}}, o::PyObject) = PyVector{T}(o)
convert(::Type{PyPtr}, a::PyVector) = a.o.o
Expand Down Expand Up @@ -433,6 +434,7 @@ type PyDict{K,V} <: Associative{K,V}
end

PyDict(o::PyObject) = PyDict{PyAny,PyAny}(o)
PyObject(d::PyDict) = d.o
PyDict() = PyDict{PyAny,PyAny}()
PyDict{K,V}(d::Associative{K,V}) = PyDict{K,V}(PyObject(d))
PyDict{V}(d::Associative{Any,V}) = PyDict{PyAny,V}(PyObject(d))
Expand Down

0 comments on commit 798d757

Please sign in to comment.