@@ -31,7 +31,7 @@ isassigned(a::Array, i::Int...) = isdefined(a, i...)
31
31
# # copy ##
32
32
33
33
function unsafe_copy! {T} (dest:: Ptr{T} , src:: Ptr{T} , N)
34
- ccall (:memmove , Ptr{Void}, (Ptr{Void}, Ptr{Void}, Uint ),
34
+ ccall (:memmove , Ptr{Void}, (Ptr{Void}, Ptr{Void}, UInt ),
35
35
dest, src, N* sizeof (T))
36
36
return dest
37
37
end
@@ -150,7 +150,7 @@ function getindex{T<:Union(Char,Number)}(::Type{T}, r1::Range, rs::Range...)
150
150
return a
151
151
end
152
152
153
- function fill! {T<:Union(Int8,Uint8 )} (a:: Array{T} , x:: Integer )
153
+ function fill! {T<:Union(Int8,UInt8 )} (a:: Array{T} , x:: Integer )
154
154
ccall (:memset , Ptr{Void}, (Ptr{Void}, Int32, Csize_t), a, x, length (a))
155
155
return a
156
156
end
@@ -402,7 +402,7 @@ function _growat!(a::Vector, i::Integer, delta::Integer)
402
402
end
403
403
404
404
function _growat_beg! (a:: Vector , i:: Integer , delta:: Integer )
405
- ccall (:jl_array_grow_beg , Void, (Any, Uint ), a, delta)
405
+ ccall (:jl_array_grow_beg , Void, (Any, UInt ), a, delta)
406
406
if i > 1
407
407
ccall (:memmove , Ptr{Void}, (Ptr{Void}, Ptr{Void}, Csize_t),
408
408
pointer (a, 1 ), pointer (a, 1 + delta), (i- 1 )* elsize (a))
@@ -411,7 +411,7 @@ function _growat_beg!(a::Vector, i::Integer, delta::Integer)
411
411
end
412
412
413
413
function _growat_end! (a:: Vector , i:: Integer , delta:: Integer )
414
- ccall (:jl_array_grow_end , Void, (Any, Uint ), a, delta)
414
+ ccall (:jl_array_grow_end , Void, (Any, UInt ), a, delta)
415
415
n = length (a)
416
416
if n >= i+ delta
417
417
ccall (:memmove , Ptr{Void}, (Ptr{Void}, Ptr{Void}, Csize_t),
@@ -438,7 +438,7 @@ function _deleteat_beg!(a::Vector, i::Integer, delta::Integer)
438
438
ccall (:memmove , Ptr{Void}, (Ptr{Void}, Ptr{Void}, Csize_t),
439
439
pointer (a, 1 + delta), pointer (a, 1 ), (i- 1 )* elsize (a))
440
440
end
441
- ccall (:jl_array_del_beg , Void, (Any, Uint ), a, delta)
441
+ ccall (:jl_array_del_beg , Void, (Any, UInt ), a, delta)
442
442
return a
443
443
end
444
444
@@ -448,7 +448,7 @@ function _deleteat_end!(a::Vector, i::Integer, delta::Integer)
448
448
ccall (:memmove , Ptr{Void}, (Ptr{Void}, Ptr{Void}, Csize_t),
449
449
pointer (a, i), pointer (a, i+ delta), (n- i- delta+ 1 )* elsize (a))
450
450
end
451
- ccall (:jl_array_del_end , Void, (Any, Uint ), a, delta)
451
+ ccall (:jl_array_del_end , Void, (Any, UInt ), a, delta)
452
452
return a
453
453
end
454
454
@@ -457,27 +457,27 @@ end
457
457
function push! {T} (a:: Array{T,1} , item)
458
458
# convert first so we don't grow the array if the assignment won't work
459
459
item = convert (T, item)
460
- ccall (:jl_array_grow_end , Void, (Any, Uint ), a, 1 )
460
+ ccall (:jl_array_grow_end , Void, (Any, UInt ), a, 1 )
461
461
a[end ] = item
462
462
return a
463
463
end
464
464
465
465
function push! (a:: Array{Any,1} , item:: ANY )
466
- ccall (:jl_array_grow_end , Void, (Any, Uint ), a, 1 )
466
+ ccall (:jl_array_grow_end , Void, (Any, UInt ), a, 1 )
467
467
arrayset (a, item, length (a))
468
468
return a
469
469
end
470
470
471
471
function append! {T} (a:: Array{T,1} , items:: AbstractVector )
472
472
n = length (items)
473
- ccall (:jl_array_grow_end , Void, (Any, Uint ), a, n)
473
+ ccall (:jl_array_grow_end , Void, (Any, UInt ), a, n)
474
474
copy! (a, length (a)- n+ 1 , items, 1 , n)
475
475
return a
476
476
end
477
477
478
478
function prepend! {T} (a:: Array{T,1} , items:: AbstractVector )
479
479
n = length (items)
480
- ccall (:jl_array_grow_beg , Void, (Any, Uint ), a, n)
480
+ ccall (:jl_array_grow_beg , Void, (Any, UInt ), a, n)
481
481
if a === items
482
482
copy! (a, 1 , items, n+ 1 , n)
483
483
else
@@ -489,18 +489,18 @@ end
489
489
function resize! (a:: Vector , nl:: Integer )
490
490
l = length (a)
491
491
if nl > l
492
- ccall (:jl_array_grow_end , Void, (Any, Uint ), a, nl- l)
492
+ ccall (:jl_array_grow_end , Void, (Any, UInt ), a, nl- l)
493
493
else
494
494
if nl < 0
495
495
throw (BoundsError ())
496
496
end
497
- ccall (:jl_array_del_end , Void, (Any, Uint ), a, l- nl)
497
+ ccall (:jl_array_del_end , Void, (Any, UInt ), a, l- nl)
498
498
end
499
499
return a
500
500
end
501
501
502
502
function sizehint (a:: Vector , sz:: Integer )
503
- ccall (:jl_array_sizehint , Void, (Any, Uint ), a, sz)
503
+ ccall (:jl_array_sizehint , Void, (Any, UInt ), a, sz)
504
504
a
505
505
end
506
506
@@ -509,13 +509,13 @@ function pop!(a::Vector)
509
509
error (" array must be non-empty" )
510
510
end
511
511
item = a[end ]
512
- ccall (:jl_array_del_end , Void, (Any, Uint ), a, 1 )
512
+ ccall (:jl_array_del_end , Void, (Any, UInt ), a, 1 )
513
513
return item
514
514
end
515
515
516
516
function unshift! {T} (a:: Array{T,1} , item)
517
517
item = convert (T, item)
518
- ccall (:jl_array_grow_beg , Void, (Any, Uint ), a, 1 )
518
+ ccall (:jl_array_grow_beg , Void, (Any, UInt ), a, 1 )
519
519
a[1 ] = item
520
520
return a
521
521
end
@@ -525,7 +525,7 @@ function shift!(a::Vector)
525
525
error (" array must be non-empty" )
526
526
end
527
527
item = a[1 ]
528
- ccall (:jl_array_del_beg , Void, (Any, Uint ), a, 1 )
528
+ ccall (:jl_array_del_beg , Void, (Any, UInt ), a, 1 )
529
529
return item
530
530
end
531
531
@@ -578,7 +578,7 @@ function deleteat!(a::Vector, inds)
578
578
@inbounds a[p] = a[q]
579
579
p += 1 ; q += 1
580
580
end
581
- ccall (:jl_array_del_end , Void, (Any, Uint ), a, n- p+ 1 )
581
+ ccall (:jl_array_del_end , Void, (Any, UInt ), a, n- p+ 1 )
582
582
return a
583
583
end
584
584
@@ -640,7 +640,7 @@ function splice!{T<:Integer}(a::Vector, r::UnitRange{T}, ins=_default_splice)
640
640
end
641
641
642
642
function empty! (a:: Vector )
643
- ccall (:jl_array_del_end , Void, (Any, Uint ), a, length (a))
643
+ ccall (:jl_array_del_end , Void, (Any, UInt ), a, length (a))
644
644
return a
645
645
end
646
646
@@ -828,8 +828,8 @@ function complex{T<:Real}(A::Array{T}, B::Real)
828
828
end
829
829
830
830
# use memcmp for lexcmp on byte arrays
831
- function lexcmp (a:: Array{Uint8 ,1} , b:: Array{Uint8 ,1} )
832
- c = ccall (:memcmp , Int32, (Ptr{Uint8 }, Ptr{Uint8 }, Uint ),
831
+ function lexcmp (a:: Array{UInt8 ,1} , b:: Array{UInt8 ,1} )
832
+ c = ccall (:memcmp , Int32, (Ptr{UInt8 }, Ptr{UInt8 }, UInt ),
833
833
a, b, min (length (a),length (b)))
834
834
c < 0 ? - 1 : c > 0 ? + 1 : cmp (length (a),length (b))
835
835
end
@@ -1001,7 +1001,7 @@ function vcat{T}(arrays::Vector{T}...)
1001
1001
end
1002
1002
for a in arrays
1003
1003
nba = length (a)* elsz
1004
- ccall (:memcpy , Ptr{Void}, (Ptr{Void}, Ptr{Void}, Uint ),
1004
+ ccall (:memcpy , Ptr{Void}, (Ptr{Void}, Ptr{Void}, UInt ),
1005
1005
ptr+ offset, a, nba)
1006
1006
offset += nba
1007
1007
end
0 commit comments