Mercurial > hg > vampy
comparison PyFeatureSet.h @ 32:a8231788216c vampy2
Vampy2: accept numpy array return types.
author | fazekasgy |
---|---|
date | Mon, 21 Sep 2009 13:56:28 +0000 |
parents | 4f1894c7591b |
children | c905122f79e7 |
comparison
equal
deleted
inserted
replaced
31:4f1894c7591b | 32:a8231788216c |
---|---|
3 | 3 |
4 #include <Python.h> | 4 #include <Python.h> |
5 | 5 |
6 typedef struct { | 6 typedef struct { |
7 PyDictObject dict; | 7 PyDictObject dict; |
8 int state; | |
9 } FeatureSetObject; | 8 } FeatureSetObject; |
10 | 9 |
11 PyAPI_DATA(PyTypeObject) FeatureSet_Type; | 10 PyAPI_DATA(PyTypeObject) FeatureSet_Type; |
12 | 11 |
13 #define PyFeatureSet_CheckExact(v) ((v)->ob_type == &FeatureSet_Type) | 12 #define PyFeatureSet_CheckExact(v) ((v)->ob_type == &FeatureSet_Type) |
14 #define PyFeatureSet_Check(v) PyObject_TypeCheck(v, &FeatureSet_Type) | 13 #define PyFeatureSet_Check(v) PyObject_TypeCheck(v, &FeatureSet_Type) |
15 // #define PyFeatureSet_CheckExact(v) ((v)->ob_type == &PyDict_Type) | 14 // #define PyFeatureSet_CheckExact(v) ((v)->ob_type == &PyDict_Type) |
16 // #define PyFeatureSet_Check(v) PyObject_TypeCheck(v, &PyDict_Type) | 15 // #define PyFeatureSet_Check(v) PyObject_TypeCheck(v, &PyDict_Type) |
17 | |
18 // #define PyFeature_AS_DICT(v) ((const FeatureObject* const) (v))->dict | 16 // #define PyFeature_AS_DICT(v) ((const FeatureObject* const) (v))->dict |
19 | 17 |
20 void initFeatureSetType(void); | 18 void initFeatureSetType(void); |
21 | 19 |
22 #endif | 20 #endif |