From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Damien Mattei Newsgroups: gmane.lisp.guile.user Subject: interfacing C and guile Date: Fri, 30 Dec 2022 10:36:16 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23764"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Fri Dec 30 10:37:21 2022 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pBBpJ-0005y2-2U for guile-user@m.gmane-mx.org; Fri, 30 Dec 2022 10:37:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBBoY-0000FC-8M; Fri, 30 Dec 2022 04:36:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBBoX-0000Ez-Bf for guile-user@gnu.org; Fri, 30 Dec 2022 04:36:33 -0500 Original-Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pBBoV-0000uq-C5 for guile-user@gnu.org; Fri, 30 Dec 2022 04:36:33 -0500 Original-Received: by mail-ed1-x536.google.com with SMTP id b88so22535394edf.6 for ; Fri, 30 Dec 2022 01:36:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=nxldgdmY6yd4tF7KYfu4p9K9ulNZ0HZJd5i/aCdz9Qg=; b=L+lPOkWrws4WhY+yy6/ImZWB7rH+Rk9iqkrxTHWi3gEZM/xyi/sEH7d/yfV9MzAJYP XqJzbdrzj003Em8QVcx+8IUj4p99xz3f4aZDaYCVycibvahFlHvYXfWCXIaR9LkJJ9hf 2dyTTwTdWc/O/Si55FD2CpRG/Unw6NYq8m915ZqM8j9g3gLGd2h69/SBjP2HVzFCRb3j ABu9J72Kz9mjmRsLD/CsISQnq0QNjXbKQlSLxBpfN+r7wqoD4pxAM7jnHXESmSOpMxoh vVMApU1FiW/5T+4hyG+ZBHHTL/NkjDIpnQLpTwfoBvYysCDYlk16mVtwARhamQGLyo4M nSBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=nxldgdmY6yd4tF7KYfu4p9K9ulNZ0HZJd5i/aCdz9Qg=; b=YuWiidu40QC6dxCygbbIoR/QwaMuFir+W+9A7WfmpScAaDvKWl6NQvQK825bUHMXQD iQSYSDfkVfwEWkzLji6/B8FT1l4Psl7n2mtjgIe4fydXoC6o/Xoh18Mb5GEuNdQZe3/q uyiYckZ6g1NB5PH60wP7vUMHzu+HdMOzhCzXPgNkww6MJ4PpJU8iSfjBPJqzpCP6UI2O PzKo7wjxXRMZZOSbq0vRbP+IhxhPY5RWc69zFCxbKz8PI0ENeUXI0iyZeqOIX8Nx9+hO vhUU/68GCvy8m8+mCvGhj+W+utlIdEiJe3b865mmAoy9cRMuaZvqZXcpPzif/mVAAYu0 Opfg== X-Gm-Message-State: AFqh2kot/VqiOiyTRCZVv9THqnuaZXEKzV+GngXHT3zmIJyh8DBQAEOk vpx9BBQcT4W/f5gsXPDOZBGGpDaibqrsPLLVGqV6VhJKX7v7jQ== X-Google-Smtp-Source: AMrXdXuDlCLqUFwzgL8vYMleJEuG+BzjyR7FlaH9nCcfaJLgwKL6Gi4nEwc48TB+pisIbwN9pHf7UzFcslsZfmuDlYU= X-Received: by 2002:a05:6402:4c6:b0:478:f729:3008 with SMTP id n6-20020a05640204c600b00478f7293008mr2976215edw.281.1672392987970; Fri, 30 Dec 2022 01:36:27 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=damien.mattei@gmail.com; helo=mail-ed1-x536.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:18805 Archived-At: hi, how do i declare in Guile a function that in C is of this type: int foo(int,int,char *) the problem i have is with the char *: (define cfunc (foreign-library-function "libguile-cfunc" "openmp" #:return-type int #:arg-types (list int int ????))) i do not know what to put in place of ???? Regards, Damien note: what if const char* ? (not sure i need it)