Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev

Re: [Python-3000] PyString -> PyBytes C API renaming

 

 

Python dev RSS feed   Index | Next | Previous | View Threaded


ncoghlan at gmail

May 29, 2008, 2:53 AM

Post #1 of 4 (294 views)
Permalink
Re: [Python-3000] PyString -> PyBytes C API renaming

Stefan Behnel wrote:
> M.-A. Lemburg wrote:
>> If you use PyBytes APIs, you expect to find PyBytes functions in
>> the libs and also set breakpoints on these.
>
> AFAICT, the PyBytes_* functions are in both Py2.6 and Py3 now, so no problem here.

The PyBytes_* functions appear to be there, but a preprocessor macro
means it is actually the PyString_* functions that appear in the Python
DLL. That's great from a backwards compatibility point of view, but
seriously confusing from the point of view of anyone trying to embed or
otherwise debug Python 2.6.

> Besides, how likely is it that users set a breakpoint on the PyBytes/PyString
> functions?

Not very likely at all - but it would still be nice if the PyBytes_*
symbols were visible to the linker as well as the preprocessor.

Cheers,
Nick.

--
Nick Coghlan | ncoghlan [at] gmail | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


qrczak at knm

May 29, 2008, 3:05 AM

Post #2 of 4 (267 views)
Permalink
Re: [Python-3000] PyString -> PyBytes C API renaming [In reply to]

2008/5/29 Nick Coghlan <ncoghlan [at] gmail>:

> it would still be nice if the PyBytes_* symbols
> were visible to the linker as well as the preprocessor.

If this is not a strict requirement but a useful extra, then it might
be done in an unportable way. GCC has an 'alias' attribute:
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

--
Marcin Kowalczyk
qrczak [at] knm
http://qrnik.knm.org.pl/~qrczak/
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


stefan_ml at behnel

May 29, 2008, 3:28 AM

Post #3 of 4 (281 views)
Permalink
Re: [Python-3000] PyString -> PyBytes C API renaming [In reply to]

Nick Coghlan wrote:
> Stefan Behnel wrote:
>> Besides, how likely is it that users set a breakpoint on the
>> PyBytes/PyString functions?
>
> Not very likely at all - but it would still be nice if the PyBytes_*
> symbols were visible to the linker as well as the preprocessor.

Right, that's a nice-to-have, an add-on. Why don't we just let Christian
finish his work, which is vital for the beta release? Then it's still time to
file a bug report on the missing bits and provide a patch that adds linker
symbols for PyBytes_*() in Py2.6 as an additional feature.

Stefan

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ncoghlan at gmail

May 29, 2008, 3:34 AM

Post #4 of 4 (280 views)
Permalink
Re: [Python-3000] PyString -> PyBytes C API renaming [In reply to]

Stefan Behnel wrote:
> Nick Coghlan wrote:
>> Stefan Behnel wrote:
>>> Besides, how likely is it that users set a breakpoint on the
>>> PyBytes/PyString functions?
>> Not very likely at all - but it would still be nice if the PyBytes_*
>> symbols were visible to the linker as well as the preprocessor.
>
> Right, that's a nice-to-have, an add-on. Why don't we just let Christian
> finish his work, which is vital for the beta release? Then it's still time to
> file a bug report on the missing bits and provide a patch that adds linker
> symbols for PyBytes_*() in Py2.6 as an additional feature.

Yeah, it took me a while to get my head around what he was trying to do,
but GPS explained it pretty well elsewhere in this thread.

Cheers,
Nick.

--
Nick Coghlan | ncoghlan [at] gmail | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Python dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.