lyes
1
Hi everyone
I want to now how can I indicate to swig to consider a n unsigned long
long
function input/output parameter as a ruby BigNum object.
with python, we use the typemap to do the conversion.: for example
/* Convert from Python --> C */
%typemap(in) int {
$1 = PyInt_AsLong($input);
}
/* Convert from C --> Python */
%typemap(out) int {
$result = PyInt_FromLong($1);
is there something equivalent with ruby
thank you
lyes
2
Hi,
At Fri, 14 Nov 2008 01:10:37 +0900,
Lyes A. wrote in [ruby-talk:320166]:
I want to now how can I indicate to swig to consider a n unsigned long long
function input/output parameter as a ruby BigNum object.
Maybe:
/* Convert from Python --> C */
%typemap(in) int {
$1 = ULL2NUM($input);
}
/* Convert from C --> Python */
%typemap(out) int {
$result = NUM2ULL($1);
lyes
3
On 11/13/08, Nobuyoshi N. [email protected] wrote:
Nobu Nakada
Ok thank you, I will try that