www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/01/30/02:23:50

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E5E5386F012
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1611991387;
bh=HmTieWysFp/Y/uycoIASh0KsbVb4ycn2KcUFfNUxEO0=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=dRwDI+ndYWntolpfgab83omWKQl8BhuABS5CMZOXTCI7hcePGiZ+jPyDBYL+u8BSk
Xdgfkb4Zhv9GK8Ynpjmui9I62LcOpDRF64O5k2QhBrLb7wjZdY0JtclaE2n9byKjmX
trOSsQV4mdc9l4u+rcICxTIqgEZYuhuqZ+3rbtXA=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 120A53846074
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:subject:from:to:references:message-id:date
:user-agent:mime-version:in-reply-to:content-language
:content-transfer-encoding;
bh=/J/y/+/bgJPcAtxIC3QZ8gqMiAKdyTHonomphZOrFUE=;
b=f24AasSUGrpvB4gFiU2/rQkSUACpZUsnLXYCYDfesDs3lbHg+6MuKjrWkh6qrlst99
FHlZ59mJQbA1ztmqd2E/2Z4l82HCuWXj2UwslWw00e0BGuKzB2BqiDEU3V6Mlq59A/2y
ko9+4ZGYPIrnpYdQvK9dOhCo4OMNLNQA4svxUinbf0d88jHv/XdMm+Pa7qSkDfXYfJps
9oP1Q7zuVj+53I4chf5Kr7bDCO9rbfYZOHUwXH48fwZQnVCapCwfjMmmDDxR6RNFPMQs
YD3JVjrjHxIfkOQKgBDSZU219Y36u4w69dvkOERjBPPRu2Wp+91j62Wl0azEcCOe+SEP
aqKw==
X-Gm-Message-State: AOAM53189peZgwrEhp0TnupGyOxVhgPEl40LxZ128hrxydO0VEMeFCFe
SFUuxpue/pSCAL/Cuy6kW0ENTwJoha+e9g==
X-Google-Smtp-Source: ABdhPJxRUKpV47fClTnV0L59QywAufvKuHfgkHhsZZV+/ROjgbeNwTyBlbkjeRu29ddgR6hu9GXtiw==
X-Received: by 2002:a05:6402:17f3:: with SMTP id
t19mr8971981edy.93.1611991384008;
Fri, 29 Jan 2021 23:23:04 -0800 (PST)
Subject: Re: python-cython C++ support patch
To: cygwin AT cygwin DOT com
References: <20210129 DOT 193143 DOT 371461372727925270 DOT trueroad AT trueroad DOT jp>
<7edac602-ab79-7421-f5f8-929c7fa68428 AT gmail DOT com>
Message-ID: <47f218c3-30f3-c07d-6e2a-9ee7bebd4228@gmail.com>
Date: Sat, 30 Jan 2021 08:23:03 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.7.0
MIME-Version: 1.0
In-Reply-To: <7edac602-ab79-7421-f5f8-929c7fa68428@gmail.com>
X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A,
RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Marco Atzeri via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 10U7NZCd005302

On 29.01.2021 15:18, Marco Atzeri wrote:
> On 29.01.2021 11:31, Masamichi Hosoda wrote:
>> Hi,
>>
>> I've found that modules built by python-cython with C++ could not be 
>> loaded.
>> If I understand correctly, the following patch fixes it.
>> Would you like to apply this patch to the package?
>>
>> ```
>> --- a/Cython-0.29.21/Cython/Utility/ModuleSetupCode.c
>> +++ b/Cython-0.29.21/Cython/Utility/ModuleSetupCode.c
>> @@ -709,7 +709,11 @@
>>   /////////////// PyModInitFuncType.proto ///////////////
>>   #ifndef CYTHON_NO_PYINIT_EXPORT
>> +#ifdef __cplusplus
>> +#define __Pyx_PyMODINIT_FUNC  extern "C" PyObject *
>> +#else
>>   #define __Pyx_PyMODINIT_FUNC  PyObject *
>> +#endif
>>   #elif PY_MAJOR_VERSION < 3
>>   // Py2: define this to void manually because PyMODINIT_FUNC adds 
>> __declspec(dllexport) to it's definition.
>> ```
>>

have you considered that you just need to define
CYTHON_NO_PYINIT_EXPORT ?

the portion of the code below your change has already the
ifdef __cplusplus semantic

Have you proposed it upstream ? It does not seem
a change restricted to Cygwin

Any way I see no "wrongness" to add it on the Cython rebuild

Regards
Marco

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019