Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.io.base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.io.base
Commits
6e4bef7a
Commit
6e4bef7a
authored
10 years ago
by
Manuel Günther
Browse files
Options
Downloads
Patches
Plain Diff
Switched API numbering from (error-prone) defines to enum.
parent
68851fdb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xbob/io/include/xbob.io/api.h
+23
-18
23 additions, 18 deletions
xbob/io/include/xbob.io/api.h
with
23 additions
and
18 deletions
xbob/io/include/xbob.io/api.h
+
23
−
18
View file @
6e4bef7a
...
@@ -31,11 +31,33 @@
...
@@ -31,11 +31,33 @@
* C API functions *
* C API functions *
*******************/
*******************/
/* Enum defining entries in the function table */
enum
_PyBobIo_ENUM
{
PyXbobIo_APIVersion_NUM
=
0
,
// Bindings for xbob.io.file
PyBobIoFile_Type_NUM
,
PyBobIoFileIterator_Type_NUM
,
// I/O generic bindings
PyBobIo_AsTypenum_NUM
,
PyBobIo_TypeInfoAsTuple_NUM
,
PyBobIo_FilenameConverter_NUM
,
// HDF5 bindings
PyBobIoHDF5File_Type_NUM
,
PyBobIoHDF5File_Check_NUM
,
PyBobIoHDF5File_Converter_NUM
,
#if WITH_FFMPEG
PyBobIoVideoReader_Type_NUM
,
PyBobIoVideoReaderIterator_Type_NUM
,
PyBobIoVideoWriter_Type_NUM
,
#endif // WITH_FFMPEG
// Total number of C API pointers
PyXbobIo_API_pointers
};
/**************
/**************
* Versioning *
* Versioning *
**************/
**************/
#define PyXbobIo_APIVersion_NUM 0
#define PyXbobIo_APIVersion_TYPE int
#define PyXbobIo_APIVersion_TYPE int
/*****************************
/*****************************
...
@@ -51,7 +73,6 @@ typedef struct {
...
@@ -51,7 +73,6 @@ typedef struct {
}
PyBobIoFileObject
;
}
PyBobIoFileObject
;
#define PyBobIoFile_Type_NUM 1
#define PyBobIoFile_Type_TYPE PyTypeObject
#define PyBobIoFile_Type_TYPE PyTypeObject
typedef
struct
{
typedef
struct
{
...
@@ -63,22 +84,18 @@ typedef struct {
...
@@ -63,22 +84,18 @@ typedef struct {
}
PyBobIoFileIteratorObject
;
}
PyBobIoFileIteratorObject
;
#define PyBobIoFileIterator_Type_NUM 2
#define PyBobIoFileIterator_Type_TYPE PyTypeObject
#define PyBobIoFileIterator_Type_TYPE PyTypeObject
/************************
/************************
* I/O generic bindings *
* I/O generic bindings *
************************/
************************/
#define PyBobIo_AsTypenum_NUM 3
#define PyBobIo_AsTypenum_RET int
#define PyBobIo_AsTypenum_RET int
#define PyBobIo_AsTypenum_PROTO (bob::core::array::ElementType et)
#define PyBobIo_AsTypenum_PROTO (bob::core::array::ElementType et)
#define PyBobIo_TypeInfoAsTuple_NUM 4
#define PyBobIo_TypeInfoAsTuple_RET PyObject*
#define PyBobIo_TypeInfoAsTuple_RET PyObject*
#define PyBobIo_TypeInfoAsTuple_PROTO (const bob::core::array::typeinfo& ti)
#define PyBobIo_TypeInfoAsTuple_PROTO (const bob::core::array::typeinfo& ti)
#define PyBobIo_FilenameConverter_NUM 5
#define PyBobIo_FilenameConverter_RET int
#define PyBobIo_FilenameConverter_RET int
#define PyBobIo_FilenameConverter_PROTO (PyObject* o, PyObject** b)
#define PyBobIo_FilenameConverter_PROTO (PyObject* o, PyObject** b)
...
@@ -94,14 +111,11 @@ typedef struct {
...
@@ -94,14 +111,11 @@ typedef struct {
}
PyBobIoHDF5FileObject
;
}
PyBobIoHDF5FileObject
;
#define PyBobIoHDF5File_Type_NUM 6
#define PyBobIoHDF5File_Type_TYPE PyTypeObject
#define PyBobIoHDF5File_Type_TYPE PyTypeObject
#define PyBobIoHDF5File_Check_NUM 7
#define PyBobIoHDF5File_Check_RET int
#define PyBobIoHDF5File_Check_RET int
#define PyBobIoHDF5File_Check_PROTO (PyObject* o)
#define PyBobIoHDF5File_Check_PROTO (PyObject* o)
#define PyBobIoHDF5File_Converter_NUM 8
#define PyBobIoHDF5File_Converter_RET int
#define PyBobIoHDF5File_Converter_RET int
#define PyBobIoHDF5File_Converter_PROTO (PyObject* o, PyBobIoHDF5FileObject** a)
#define PyBobIoHDF5File_Converter_PROTO (PyObject* o, PyBobIoHDF5FileObject** a)
...
@@ -119,7 +133,6 @@ typedef struct {
...
@@ -119,7 +133,6 @@ typedef struct {
}
PyBobIoVideoReaderObject
;
}
PyBobIoVideoReaderObject
;
#define PyBobIoVideoReader_Type_NUM 9
#define PyBobIoVideoReader_Type_TYPE PyTypeObject
#define PyBobIoVideoReader_Type_TYPE PyTypeObject
typedef
struct
{
typedef
struct
{
...
@@ -131,7 +144,6 @@ typedef struct {
...
@@ -131,7 +144,6 @@ typedef struct {
}
PyBobIoVideoReaderIteratorObject
;
}
PyBobIoVideoReaderIteratorObject
;
#define PyBobIoVideoReaderIterator_Type_NUM 10
#define PyBobIoVideoReaderIterator_Type_TYPE PyTypeObject
#define PyBobIoVideoReaderIterator_Type_TYPE PyTypeObject
typedef
struct
{
typedef
struct
{
...
@@ -142,17 +154,10 @@ typedef struct {
...
@@ -142,17 +154,10 @@ typedef struct {
}
PyBobIoVideoWriterObject
;
}
PyBobIoVideoWriterObject
;
#define PyBobIoVideoWriter_Type_NUM 11
#define PyBobIoVideoWriter_Type_TYPE PyTypeObject
#define PyBobIoVideoWriter_Type_TYPE PyTypeObject
#endif
/* WITH_FFMPEG */
#endif
/* WITH_FFMPEG */
/* Total number of C API pointers */
#if WITH_FFMPEG
# define PyXbobIo_API_pointers 12
#else
# define PyXbobIo_API_pointers 9
#endif
/* WITH_FFMPEG */
#ifdef XBOB_IO_MODULE
#ifdef XBOB_IO_MODULE
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment