Skip to content

Commit 1feb90e

Browse files
yuyichaostevengj
authored andcommitted
Fix 0.6 typealias depwarn (#363)
1 parent 1a1a93e commit 1feb90e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
julia 0.4
2-
Compat 0.17.0
2+
Compat 0.18.0
33
Conda 0.2
44
MacroTools 0.2

src/PyCall.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ immutable PyObject_struct
5252
ob_type::Ptr{Void}
5353
end
5454

55-
typealias PyPtr Ptr{PyObject_struct} # type for PythonObject* in ccall
55+
const PyPtr = Ptr{PyObject_struct} # type for PythonObject* in ccall
5656

5757
const PyPtr_NULL = PyPtr(C_NULL)
5858

@@ -165,7 +165,7 @@ PyObject(o::PyPtr, keep::Any) = pyembed(PyObject(o), keep)
165165

166166
#########################################################################
167167

168-
typealias TypeTuple{N} Union{Type,NTuple{N, Type}}
168+
@compat TypeTuple{N} = Union{Type,NTuple{N, Type}}
169169
include("pybuffer.jl")
170170
include("conversions.jl")
171171
include("pytype.jl")

src/conversions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ pyptr_query(po::PyObject) = pyisinstance(po, c_void_p_Type) || pyisinstance(po,
137137

138138
# I want to use a union, but this seems to confuse Julia's method
139139
# dispatch for the convert function in some circumstances
140-
# typealias PyAny Union{PyObject, Int, Bool, Float64, Complex128, AbstractString, Function, Dict, Tuple, Array}
140+
# const PyAny = Union{PyObject, Int, Bool, Float64, Complex128, AbstractString, Function, Dict, Tuple, Array}
141141
@compat abstract type PyAny end
142142

143143
function pyany_toany(T::Type)

src/numpy.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ npy_type(::Type{Complex64}) = NPY_CFLOAT
162162
npy_type(::Type{Complex128}) = NPY_CDOUBLE
163163
npy_type(::Type{PyPtr}) = NPY_OBJECT
164164

165-
typealias NPY_TYPES Union{Bool,Int8,UInt8,Int16,UInt16,Int32,UInt32,Int64,UInt64,Float16,Float32,Float64,Complex64,Complex128,PyPtr}
165+
const NPY_TYPES = Union{Bool,Int8,UInt8,Int16,UInt16,Int32,UInt32,Int64,UInt64,Float16,Float32,Float64,Complex64,Complex128,PyPtr}
166166

167167
# conversions from __array_interface__ type strings to supported Julia types
168168
const npy_typestrs = Dict( "b1"=>Bool,

0 commit comments

Comments
 (0)