From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.user Subject: Re: #define SOMETHING some_value Date: Sun, 11 Jun 2017 16:06:28 -0400 Message-ID: <87o9tu2ssb.fsf@netris.org> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1497211629 7216 195.159.176.226 (11 Jun 2017 20:07:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Jun 2017 20:07:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: guile-user@gnu.org, Matt Wette To: Catonano Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jun 11 22:07:05 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dK98a-0001aW-CF for guile-user@m.gmane.org; Sun, 11 Jun 2017 22:07:04 +0200 Original-Received: from localhost ([::1]:35055 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dK98f-0008EV-QM for guile-user@m.gmane.org; Sun, 11 Jun 2017 16:07:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dK98H-0008EM-4J for guile-user@gnu.org; Sun, 11 Jun 2017 16:06:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dK98E-0000FP-3x for guile-user@gnu.org; Sun, 11 Jun 2017 16:06:45 -0400 Original-Received: from world.peace.net ([50.252.239.5]:42448) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dK98D-0000FJ-WC for guile-user@gnu.org; Sun, 11 Jun 2017 16:06:42 -0400 Original-Received: from pool-72-93-31-241.bstnma.east.verizon.net ([72.93.31.241] helo=jojen) by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dK98C-0000v4-Ew; Sun, 11 Jun 2017 16:06:40 -0400 In-Reply-To: (catonano@gmail.com's message of "Sun, 11 Jun 2017 19:08:11 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 50.252.239.5 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13812 Archived-At: Catonano writes: > 2017-06-10 17:55 GMT+02:00 Matt Wette : > > Yea. I may have steered you wrong before. (I didn=E2=80=99t look back.) = The >> argument signature might need to be (list =E2=80=98* unsigned-short =E2= =80=98*) 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