Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dotCall64
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reinhard Furrer
dotCall64
Commits
1cfc4937
Commit
1cfc4937
authored
7 years ago
by
Florian Gerber
Browse files
Options
Downloads
Patches
Plain Diff
.
parent
167ad0ae
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
inst/include/dotCall64.h
+1
-1
1 addition, 1 deletion
inst/include/dotCall64.h
src/dotCall64.c
+4
-4
4 additions, 4 deletions
src/dotCall64.c
with
5 additions
and
5 deletions
inst/include/dotCall64.h
+
1
−
1
View file @
1cfc4937
...
...
@@ -16,7 +16,7 @@
/*
* Because R does not define an int64 type, this pseudo type is used to
* indicate an int64_t argument type:
* Currently, R only uses 4 bits for
it's
types. Therefore this value will not
* Currently, R only uses 4 bits for types. Therefore
,
this value will not
* clash.
*/
#define INT64_TYPE 9999
...
...
This diff is collapsed.
Click to expand it.
src/dotCall64.c
+
4
−
4
View file @
1cfc4937
...
...
@@ -209,7 +209,7 @@ SEXP dC64(SEXP args_in) {
}
// Determine if the arguments
we
re named and keep the names if true.
// Determine if the arguments
a
re named and keep the names if true.
SEXP
names
=
NULL
;
Rboolean
havenames
=
FALSE
;
for
(
na
=
0
;
na
<
nargs
;
na
++
)
{
...
...
@@ -321,7 +321,7 @@ void dotCall64(DL_FUNC fun, int nargs, SEXP *args, int *args_type, int *args_int
do_type
[
na
]
=
args_type
[
na
];
}
// Check if a warning should be raised in case the provided argu
e
ment type dose not match the expected type.
// Check if a warning should be raised in case the provided argument type dose not match the expected type.
if
(
flag_verbose
>=
1
&&
TYPEOF
(
s
)
!=
do_type
[
na
])
{
warning
(
_
(
"[dotCall64|wrong R object type] argument %d; expected type '%s'; got type '%s'; argument coerced"
),
na
+
1
,
type2char
(
do_type
[
na
]),
CHAR
(
type2str
(
TYPEOF
(
s
))));
...
...
@@ -396,11 +396,11 @@ static void prepareArguments(DL_FUNC fun, int nargs, SEXP *args,
int
na
;
void
**
cargs
[
MAX_ARGS
];
// pointers for the actual function.
SEXP
args_in
[
MAX_ARGS
];
// contains a copy of the arguments
given
.
SEXP
args_in
[
MAX_ARGS
];
// contains a copy of the
given
arguments.
int
n_protect
=
0
;
// counts how many times PROTECT has been called.
// Copy the
the
argument
: Used
for efficient int64 casting.
// Copy the argument
(
for efficient int64 casting
)
.
for
(
na
=
0
;
na
<
nargs
;
na
++
)
args_in
[
na
]
=
args
[
na
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment