davidmalcolm / gcc-python-plugin

GCC plugin that embeds CPython inside the compiler
GNU General Public License v3.0
199 stars 58 forks source link

partial implementation of PyString_AsStringAndSize #75

Open davidmalcolm opened 7 years ago

davidmalcolm commented 7 years ago

Attached there is a patch sketching PyString_AsStringAndSize.

the function takes two output parameters and returns 0 in case of success, -1 on failure. I've only implemented the return value; as a result, the buffer seems uninitialized downstream.

Is there an example of a function handling output parameters where to get hint about how to implement it?

api doc: http://docs.python.org/c-api/string.html#PyString_AsStringAndSize

davidmalcolm commented 7 years ago

Imported from trac issue 35. Created by dvarrazzo on 2012-03-03T20:54:05, last modified: 2012-03-03T20:54:05