Commit ce453f7d authored by André Anjos's avatar André Anjos 💬

Preliminary implementation for LIBSVM file reading support

parent faa10d5c
......@@ -195,6 +195,7 @@ setup(
),
Extension("xbob.learn.libsvm._library",
[
"xbob/learn/libsvm/pyfile.cpp",
"xbob/learn/libsvm/pymachine.cpp",
"xbob/learn/libsvm/main.cpp",
"xbob/learn/libsvm/file.cpp",
......
......@@ -36,10 +36,8 @@ static PyModuleDef module_definition = {
static PyObject* create_module (void) {
/**
PyBobLearnLibsvmFile_Type.tp_new = PyType_GenericNew;
if (PyType_Ready(&PyBobLearnLibsvmFile_Type) < 0) return 0;
**/
PyBobLearnLibsvmMachineSvmType_Type.tp_new = PyType_GenericNew;
if (PyType_Ready(&PyBobLearnLibsvmMachineSvmType_Type) < 0) return 0;
......@@ -68,10 +66,8 @@ static PyObject* create_module (void) {
if (PyModule_AddStringConstant(m, "__version__", XBOB_EXT_MODULE_VERSION) < 0) return 0;
/* register the types to python */
/**
Py_INCREF(&PyBobLearnLibsvmFile_Type);
if (PyModule_AddObject(m, "File", (PyObject *)&PyBobLearnLibsvmFile_Type) < 0) return 0;
**/
Py_INCREF(&PyBobLearnLibsvmMachineSvmType_Type);
if (PyModule_AddObject(m, "svm_type", (PyObject *)&PyBobLearnLibsvmMachineSvmType_Type) < 0) return 0;
......@@ -101,11 +97,9 @@ static PyObject* create_module (void) {
* Bindings for xbob.learn.libsvm.File *
***************************************/
/**
PyXbobLearnLibsvm_API[PyBobLearnLibsvmFile_Type_NUM] = (void *)&PyBobLearnLibsvmFile_Type;
PyXbobLearnLibsvm_API[PyBobLearnLibsvmFile_Check_NUM] = (void *)&PyBobLearnLibsvmFile_Check;
**/
/******************************************
* Bindings for xbob.learn.libsvm.Machine *
......
This diff is collapsed.
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