[issue11410] Use GCC visibility attrs in PyAPI_*

2019-10-31 Thread Vinay Sajip


Change by Vinay Sajip :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2019-10-15 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset 0b60f64e4343913b4931dc27379d9808e5b78fe1 by Vinay Sajip in branch 
'master':
bpo-11410: Standardize and use symbol visibility attributes across POSIX and 
Windows. (GH-16347)
https://github.com/python/cpython/commit/0b60f64e4343913b4931dc27379d9808e5b78fe1


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2019-09-23 Thread Vinay Sajip


Change by Vinay Sajip :


--
versions: +Python 3.9 -Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2019-09-23 Thread Vinay Sajip


Change by Vinay Sajip :


--
pull_requests: +15924
pull_request: https://github.com/python/cpython/pull/16347

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2019-09-23 Thread Vinay Sajip


Vinay Sajip  added the comment:

Reopening, as a new patch is available.

--
nosy: +vinay.sajip
resolution: out of date -> 
stage: resolved -> patch review
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2017-09-01 Thread Nathaniel Smith

Nathaniel Smith added the comment:

Was this actually fixed, or did everyone just get tired and give up on the 
original patch?

--
nosy: +njs

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2017-05-22 Thread Thomas Wouters

Changes by Thomas Wouters :


--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2015-03-22 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

See also the issue #19569: "Use __attribute__((deprecated)) to warn usage of 
deprecated functions and macros".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2015-03-17 Thread STINNER Victor

STINNER Victor added the comment:

In the issue #23685, I proposed a patch to add _PyBUILTIN_MODINIT_FUNC for 
builtin modules. It makes possible to hide PyInit_xxx symbols of builtin 
symbols with __attribute__((visibility("hidden"))). It also avoids to export 
these privates symbols on Windows in the Python DLL (and on Linux in the Python 
.so library).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2015-03-17 Thread STINNER Victor

STINNER Victor added the comment:

> The getargs.c change *is* necessary, although it doesn't have to be that 
> exact change.

Why not moving these declarations to Include/modsupport.h where 
_PyArg_Parse...() are already used?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2015-03-17 Thread STINNER Victor

STINNER Victor added the comment:

+#if defined(__GNUC__) && __GNUC__ >= 4
+#   define HAVE_ATTRIBUTE_VISIBILITY
+#endif

Clang now also supports __attribute__((visibility("..."))). I don't know since 
which version.

I'm not sure because I don't see it:
http://clang.llvm.org/docs/AttributeReference.html

I see it there:
http://llvm.org/docs/LangRef.html#visibility-styles

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2015-03-17 Thread STINNER Victor

STINNER Victor added the comment:

I extracted the changes on the PyMODINIT_FUNC macro and I opened the issue 
#23685.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2015-03-16 Thread Samuel Bronson

Samuel Bronson added the comment:

Um ... any progress on reviewing this?

--
nosy: +SamB

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2013-12-03 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2013-12-02 Thread Tom Tromey

Changes by Tom Tromey :


--
nosy: +tromey

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2011-03-07 Thread Dave Malcolm

Changes by Dave Malcolm :


--
nosy: +dmalcolm

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2011-03-06 Thread Thomas Wouters

Changes by Thomas Wouters :


Removed file: http://bugs.python.org/file21014/gcc-visibility.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2011-03-06 Thread Thomas Wouters

Thomas Wouters  added the comment:

Windows/Cygwin parts of the patch reverted and new patch uploaded. My point 
about the _Py*_SizeT functions is that they're only declared when you define 
PY_SSIZE_T_CLEAN, and I don't know if we want to change that (I don't think it 
makes sense to.)

--
Added file: http://bugs.python.org/file21024/gcc-visibility.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2011-03-06 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Exporting the SizeT functions on all systems is fine. It's not true that they 
aren't declared: they are declared in modsupport.h if PY_SSIZE_T_CLEAN is 
defined. Else they are not declared.

The patch looks fine to. I agree that mere cleanup shouldn't get committed 
along with substantial changes.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2011-03-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> The cygwin changes are no-ops, just refactoring the needlessly nested
> if statement for clarity. I can revert them.

Perhaps you can commit them separately? I don't think they need review.

As for the getargs.c change, perhaps Martin has an opinion. I bet he's more 
knowledgeable than me on the matter.

--
nosy: +loewis

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2011-03-06 Thread Thomas Wouters

Thomas Wouters  added the comment:

The cygwin changes are no-ops, just refactoring the needlessly nested if 
statement for clarity. I can revert them.

The getargs.c change *is* necessary, although it doesn't have to be that exact 
change. The problem is that the functions in that block are not declared in any 
file in Include/, although I don't know why not (it's true that these function 
shouldn't be called directly, but they are symbols that should be exported. The 
ifdef the patch removes makes the export happen only for Windows, but I see no 
reason to do that conditionally.) To be clear, the #define of (for example) 
PyArg_Parse to _PyArg_Parse_SizeT in Include/modsupport.h doesn't apply, 
because Python/getargs.c does not (and must not) define PY_SSIZE_T_CLEAN (or we 
wouldn't be able to define both PyArg_Parse and _PyArg_Parse_SizeT.)

We could just list these functions in Include/modsupport.h, along with the 
'public' (non-PY_SSIZE_T_CLEAN) ones -- but that only makes sense if  we want 
code to call the ssize_t functions directly, which I don't think we want.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2011-03-06 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage:  -> patch review
type:  -> feature request
versions: +Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2011-03-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Why the cygwin changes? Are they related? Also, is the change in 
Python/getargs.c necessary?

--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2011-03-05 Thread Thomas Wouters

Thomas Wouters  added the comment:

Uploaded to Rietveld, too: http://codereview.appspot.com/4260052/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2011-03-05 Thread Thomas Wouters

Changes by Thomas Wouters :


--
Removed message: http://bugs.python.org/msg130144

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2011-03-05 Thread Thomas Wouters

Thomas Wouters  added the comment:

This patch adds support for the GCC visibility attributes to the PyAPI_* macros 
(currently only used for Windows.) GCC's default visibility is 'public', but 
can be changed to 'hidden' with the '-fvisibility=hidden' argument; see 
http://gcc.gnu.org/wiki/Visibility. This patch does not make the build use 
that, it merely makes Python function correctly when the default visibility 
*is* changed. (The benefit of building Python with -fvisibility=hidden is very 
small, as it causes only a handful of symbols to not be exported. When 
embedding Python, though, this can make a lot of difference.)

The patch also fixes a few modules that don't use PyMODINIT_FUNC for their 
module-init function definitions, like they should.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2011-03-05 Thread Thomas Wouters

New submission from Thomas Wouters :

This patch adds support for the GCC visibility attributes to the PyAPI_* macros 
(currently only used for Windows.) GCC's default visibility is 'public', but 
can be changed to 'hidden' with the '-fvisibility=hidden' argument; see 
http://gcc.gnu.org/wiki/Visibility. This patch does not make the build use 
that, it merely makes Python function correctly when the default visibility 
*is* changed. (The benefit of building Python with -fvisibility=hidden is very 
small, as it causes only a handful of symbols to not be exported. When 
embedding Python, though, this can make a lot of difference.)

The patch also fixes a few modules that don't use PyMODINIT_FUNC for their 
module-init function definitions, like they should.

--
files: gcc-visibility.diff
keywords: needs review, patch
messages: 130143
nosy: twouters
priority: normal
severity: normal
status: open
title: Use GCC visibility attrs in PyAPI_*
Added file: http://bugs.python.org/file21014/gcc-visibility.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com