[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: #define SOMETHING some_value
From: |
Mark H Weaver |
Subject: |
Re: #define SOMETHING some_value |
Date: |
Sun, 11 Jun 2017 16:06:28 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Catonano <address@hidden> writes:
> 2017-06-10 17:55 GMT+02:00 Matt Wette <address@hidden>:
>
> Yea. I may have steered you wrong before. (I didn’t look back.) The
>> argument signature might need to be (list ‘* unsigned-short ‘*) rather than
>> your current one with unsigned-int.
I agree with Matt that you should use 'unsigned-short' here, since
that's the type specified in the C function prototype. Although it is
true that most platform ABIs will treat them equivalently for purposes
of argument passing, the C standards provide no guarantee of that as far
as I can tell.
> I tried with no result :-/
What does "no result" mean here? For now, I will assume it means that
you get the same error as before:
ERROR: Throw to key `get-info-error' with args `(error-code -3)'.
The -3 corresponds to:
#define FREEXL_INVALID_HANDLE -3 /* Invalid xls_handle argument. */
So I would consider it likely that the problem is with the first
argument (the handle), not the second one (the unsigned short).
> Also, unsigned-short isn't mentioned in the guile manual
> (API reference -> Foreign pointers -> Foreign types)
Indeed, this is an omission in the manual. Thanks for letting us know.
Mark