change as(...,"integer") to as.integer to force conversion into integers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11015 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
68710cf9d0
commit
67e2785cb7
1 changed files with 7 additions and 4 deletions
|
|
@ -35,15 +35,18 @@
|
|||
INTSXP.
|
||||
*/
|
||||
|
||||
/* Force coercion of integer, since by default R sets all constants to
|
||||
numeric, which means that you can't directly call a function with an
|
||||
integer using an R numercal literal */
|
||||
|
||||
%typemap(scoercein) int, int *, int &
|
||||
%{ $input = as($input, "integer"); %}
|
||||
%{ $input = as.integer($input); %}
|
||||
%typemap(scoercein) ptrdiff_t, ptrdiff_t *, ptrdiff_t &
|
||||
%{ $input = as($input, "integer"); %}
|
||||
%{ $input = as.integer($input); %}
|
||||
%typemap(scoercein) unsigned long, unsigned long *, unsigned long &
|
||||
%{ $input = as($input, "integer"); %}
|
||||
%{ $input = as.integer($input); %}
|
||||
%typemap(scoercein) unsigned int, unsigned int *, unsigned int &
|
||||
%{ $input = as($input, "integer"); %}
|
||||
%{ $input = as.integer($input); %}
|
||||
%typemap(scoercein) double, double *, double &
|
||||
%{ %}
|
||||
%typemap(scoercein) float, float *, float &
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue