From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37330 invoked by alias); 29 Jan 2017 07:35:28 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 37317 invoked by uid 89); 29 Jan 2017 07:35:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=H*Ad:U*kawa, browsing, H*r:sk:kawa@so, Hx-languages-length:2331 X-HELO: mail-vk0-f44.google.com Received: from mail-vk0-f44.google.com (HELO mail-vk0-f44.google.com) (209.85.213.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 29 Jan 2017 07:35:18 +0000 Received: by mail-vk0-f44.google.com with SMTP id r136so199806898vke.1 for ; Sat, 28 Jan 2017 23:35:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oXOy9O0rhWJozeF8rX1tCWGau+8dqmBqY3Cg0QhCIqs=; b=QDVtpNLqTUX7vMGnCB5owGeP1kTjWDDPk3tgzzlmJ0ayEvUYLQQnFHWr9QNnwvdEp/ CSPYjjGWHIufocV2B3KjjfzYJCJoqB/G5J3v/uC1EoGHmhJeyoTg8fGZ8Z26uGKRKt+z vTT8r9xh/HM7MTnRhVthJjv9ZyRSJEkuqiE9m/g8JCpIJMNvuY/0VW1+fqX5B7OnxStn RgIj31yjzMvyW3LGHpjPiT2p6Sp0/SVbHuX+PPeh1y8ZZETYqGD387ALY2+ykcCDXi3k +bOGFbNBZQLnA5LEdmroIOjGWmy3VY40xI2ebkLDfIXAqRWooFnd2BBQ1g6j+iFYRg6G ZYSw== X-Gm-Message-State: AIkVDXLNPDlyWlVbxXc8LwmqrVWhiBw0TDpozWUWCXhd3CrWM68k4uiSQ42/5bTYaI1GsVD6eueFWa4gfgCLPA== X-Received: by 10.31.156.201 with SMTP id f192mr7734800vke.14.1485675316366; Sat, 28 Jan 2017 23:35:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.48.66 with HTTP; Sat, 28 Jan 2017 23:35:16 -0800 (PST) In-Reply-To: References: From: scprotz Date: Sun, 29 Jan 2017 07:35:00 -0000 Message-ID: Subject: Re: Missing feature or just differences with Guile for define-public To: Per Bothner Cc: kawa@sourceware.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2017-q1/txt/msg00041.txt.bz2 Thanks. This answers my question. I was browsing the Kawa docs and those functions seemed very similar so I'll explore them and see if I can use them as drop-in solutions (or decent approximations). If I ever get it all up and running, I'll be sure to post the results back for others. On Sun, Jan 29, 2017 at 11:03 AM, Per Bothner wrote: > On 01/28/2017 10:07 PM, scprotz wrote: >> >> So my guess is, from a functional point of view, 'define-public' is >> essentially like 'extern' in C (exposing the function to the C/Gnome) >> calls? >> >> I have already reviewed the C/C++ code in Aisleriot and converting it >> from C to Java has been very easy so far (since GTK/Glib have very >> similar counterparts in Java). I'm just trying to figure out how I'd >> make the functional equivalent of a 'define-public' in a Kawa program >> so that my Java app can call it, or is everything automatically >> exposed as part of the compiled class once compiled by Kawa (i.e. >> there would be a class called "api.class" and it would have a function >> called "setFeatures"? Again, my exposure to Kawa specifically is >> limited at this time, so just looking for pointers. >> >> If all defines are exposed as class objects (methods), then just >> changing define-public to define might be good enough > > > Guile's define-public is like a combination of Kawa's define and export. > But in Kawa export is the default - assuming there is no explicit export (or > equivalently > module-export). > > You can generally remove 'define-module', optionally replace it with > 'module-name'. > If you see a use-module, you can replace it with an 'import' or a 'require'. > (This are basically the same - import is more flexible, and is > R7RS-compatible, > so is usually preferred.) > > Lots of information in https://www.gnu.org/software/kawa/Module-classes.html > and https://www.gnu.org/software/kawa/Importing.html . > >> (since define-public seems to be a guile-specific thing to expose >> functions >> to C). > > > I don't believe that is current. My understanding it's more like 'public' > in Java. It not only exposes functions to C, but more importantly it > exposes them to other modules. > > -- > --Per Bothner > per@bothner.com http://per.bothner.com/