annotate R/rdc/demo/sqrt.R @ 50:edf5c85de5ac
put pyi next to so for mypy to pick it up, directly
author |
Tassilo Philipp |
date |
Sat, 14 Nov 2020 21:18:09 +0100 (2020-11-14) |
parents |
0cfcc391201f |
children |
|
rev |
line source |
0
|
1 # File: rdc/demo/sqrt.R
|
|
2 # Description: call sqrt
|
|
3
|
|
4 if (.Platform$OS.type == "unix") {
|
|
5 dyn.load("/lib/libc.so.6")
|
|
6 } else {
|
|
7 dyn.load("/windows/system32/msvcrt")
|
|
8 }
|
|
9
|
|
10 sym.sqrt <- getNativeSymbolInfo("sqrt")
|
|
11
|
|
12 x <- 144.0
|
|
13 rdcCall( sym.sqrt$address, "d)d", x)
|
|
14
|