Commit d1cf2648 authored by Robert Bradshaw's avatar Robert Bradshaw

Fix type import enum.

parent 34bc649f
......@@ -276,6 +276,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if api_funcs:
h_code.put(UtilityCode.load_as_string("FunctionImport", "ImportExport.c")[1])
if api_extension_types:
h_code.put(UtilityCode.load_as_string("TypeImport", "ImportExport.c")[0])
h_code.put(UtilityCode.load_as_string("TypeImport", "ImportExport.c")[1])
h_code.putln("")
h_code.putln("static int import_%s(void) {" % self.api_name(env))
......
......@@ -308,6 +308,8 @@ set_path:
/////////////// TypeImport.proto ///////////////
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
enum __Pyx_ImportType_CheckSize {
__Pyx_ImportType_CheckSize_Error = 0,
......@@ -315,9 +317,10 @@ enum __Pyx_ImportType_CheckSize {
__Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); /*proto*/
#endif
/////////////// TypeImport ///////////////
#ifndef __PYX_HAVE_RT_ImportType
......@@ -325,12 +328,6 @@ static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name,
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
size_t size, enum __Pyx_ImportType_CheckSize check_size)
{
/*
* 'check_size' tells what to do if tp_basicsize is different from size:
* 0 - Error (originates in check_size=error)
* 1 - Error if tp_basicsize is smaller, warn if larger (originates in check_size=warn)
* 2 - Error if tp_basicsize is smaller, but allow compatible extensions (originates in check_size=extend)
*/
PyObject *result = 0;
char warning[200];
Py_ssize_t basicsize;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment