Skip to content

Commit

Permalink
added proper attribution for Cpp_jl, needed until package will load o…
Browse files Browse the repository at this point in the history
…n windows
  • Loading branch information
jdtuck committed Oct 20, 2015
1 parent 50d8798 commit 2056533
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
19 changes: 19 additions & 0 deletions License_Cpp_jl.txt
@@ -0,0 +1,19 @@
The MIT License (MIT)
Copyright (c) 2012-2014 Timothy E. Holy

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 changes: 7 additions & 2 deletions src/ElasticFDA.jl
Expand Up @@ -61,11 +61,16 @@ function __init__()
end

# CPP.jl workaround not compiling on windows
# the following macro was copied from https://github.com/timholy/Cpp.jl with the
# following modifications:
# 1) Update const for new julia v0.4 warnings
# 2) Formating
# the licensce for the code is included in the package directory
# Useful references:
# http://www.agner.org/optimize/calling_conventions.pdf
# http://mentorembedded.github.io/cxx-abi/abi.html#mangling

const SUBSTITUTION = [""; map(string, collect(0:9)); map(string, collect('A':'Z'))] # FIXME more than 37 arguments?
const SUBSTITUTION = [""; map(string, collect(0:9)); map(string, collect('A':'Z'))];

# Allow calling of functions in C++ shared libraries.
# Usage: a = @cpp ccall((:mysymbol,mylib),...)
Expand Down Expand Up @@ -100,7 +105,7 @@ macro cpp(ex)
pstr = ""
symtable = (:Void,:Bool,:Cchar,:Char,:ASCIIString,:Int,:Int8,:Uint8,:Int16,:Uint16,:Int32,:Cint,:Uint32,:Int64,:Uint64,:Float32,:Float64)
# GNU3-4 ABI v.3 and v.4
ptable = ('v', 'b', 'c', 'w', "Pc", 'i', 'a', 'h', 's', 't', 'i', 'i', 'j', 'l', 'm', 'f', 'd')
ptable = ('v', 'b', 'c', 'w', "Pc", 'i', 'a', 'h', 's', 't', 'i', 'i', 'j', 'l', 'm', 'f', 'd')
msub = ASCIIString[]
for iarg = 1:length(exargs)
thisarg = exargs[iarg]
Expand Down

0 comments on commit 2056533

Please sign in to comment.