-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suppress warnings on julia v0.6 #26
Changes from all commits
cdb51fc
4a7bebb
f2e2a43
e194e2e
c933069
d4cbe72
07755e5
aa29cfc
33c6ec3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ os: | |
- linux | ||
- osx | ||
julia: | ||
- 0.4 | ||
- 0.5 | ||
- nightly | ||
notifications: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
julia 0.4 | ||
julia 0.5 | ||
DataFrames 0.7 | ||
DataArrays 0.3 | ||
FileIO 0.1.2 | ||
GZip 0.2 | ||
Compat 0.8 | ||
Compat 0.17 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
""" | ||
RDA (R data archive) reading context. | ||
|
||
* Stores flags that define how R objects are read and converted | ||
into Julia objects. | ||
* Maintains the list of R objects that could be referenced later in | ||
the RDA stream. | ||
* Stores flags that define how R objects are read and converted into Julia objects. | ||
* Maintains the list of R objects that could be referenced later in the RDA stream. | ||
""" | ||
type RDAContext{T <: RDAIO} | ||
type RDAContext{T<:RDAIO} | ||
io::T # RDA input stream | ||
|
||
# RDA format properties | ||
|
@@ -18,22 +16,15 @@ type RDAContext{T <: RDAIO} | |
|
||
# intermediate data | ||
ref_tab::Vector{RSEXPREC} # SEXP array for references | ||
|
||
function RDAContext(io::T, kwoptions::Vector{Any}) | ||
fmtver = readint32(io) | ||
rver = readint32(io) | ||
rminver = readint32(io) | ||
kwdict = Dict{Symbol,Any}(kwoptions) | ||
new(io, | ||
fmtver, | ||
VersionNumber(div(rver,65536), div(rver%65536, 256), rver%256), | ||
VersionNumber(div(rminver,65536), div(rminver%65536, 256), rminver%256), | ||
kwdict, | ||
RSEXPREC[]) | ||
end | ||
end | ||
|
||
RDAContext{T <: RDAIO}(io::T, kwoptions::Vector{Any}) = RDAContext{T}(io, kwoptions) | ||
int2ver(v::Integer) = VersionNumber(v >> 16, (v >> 8) & 0xff, v & 0xff) | ||
function RDAContext{T<:RDAIO}(io::T, kwoptions::Vector{Any}=Any[]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe the old inner constructor was added in the first place to ensure the fields are valid? It so, you can keep it using the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I understand. In what way would the inner constructor ensure validity of fields that the external constructor would not? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because when the inner ctor is explicitly defined, the default implicit inner ctor (which takes the value for every field) is not generated. So any creation of the object would have to go through the explicitly provided inner ctor. Inner Constructors in the Julia manual. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't feel confident in making this change. Could someone else do it, please? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this outer ctor version is fine. Initializing the fields from |
||
fmtver = readuint32(io) | ||
rver = int2ver(readint32(io)) | ||
rminver = int2ver(readint32(io)) | ||
kwdict = Dict{Symbol,Any}(kwoptions) | ||
RDAContext(io, fmtver, rver, rminver, kwdict, RSEXPREC[]) | ||
end | ||
|
||
""" | ||
Registers R object, so that it could be referenced later | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll also need to raise the minimum version of Compat in this file to 0.17 (I think that's it) to allow
@compat abstract type
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, will do.