[issue11067] Py_LIMITED_API breaks most PySomething_Check() functions

Peter Eisentraut report at bugs.python.org
Sat Jan 29 22:34:47 CET 2011


New submission from Peter Eisentraut <peter_e at gmx.net>:

When setting Py_LIMITED_API, functions such as PyUnicode_Check() can no longer be used.  Example:

#define Py_LIMITED_API

#include <Python.h>

void foo()
{
    PyObject *o;

    PyUnicode_Check(o); 
}

test.c: In function ‘foo’:
test.c:9: error: dereferencing pointer to incomplete type

PEP 384 contains some nested language that suggests that the _Check macros should be available under the limited API.  And it seems to me that they easily could be, if Py_TYPE were implemented as a function instead of a macro.

----------
components: None
messages: 127488
nosy: petere
priority: normal
severity: normal
status: open
title: Py_LIMITED_API breaks most PySomething_Check() functions
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11067>
_______________________________________


More information about the Python-bugs-list mailing list