@@ -1507,6 +1507,10 @@ static PyObject* SetThreadWakeUp(PyObject* self, PyObject* args) {
1507
1507
return PyLong_FromLongLong ((long long )newWakeup);
1508
1508
}
1509
1509
1510
+
1511
+ PyObject* RecordArrayToColMajor (PyObject* self, PyObject* args);
1512
+
1513
+
1510
1514
// --------------------------------------------------------
1511
1515
const char * docstring_asarray =
1512
1516
" Parameters\n "
@@ -1560,8 +1564,6 @@ const char* docstring_asfastarray =
1560
1564
" asarray : Similar function.\n " ;
1561
1565
1562
1566
1563
- PyObject* RecordArrayToColMajor (PyObject* self, PyObject* args);
1564
-
1565
1567
/* ==== Set up the methods table ====================== */
1566
1568
// struct PyMethodDef {
1567
1569
// const char *ml_name; /* The name of the built-in function/method */
@@ -1713,7 +1715,7 @@ static PyModuleDef CSigMathUtilModule = {
1713
1715
NULL // freefunc
1714
1716
};
1715
1717
1716
- // For version 3, PyInut_Name must be used as this function is called when the module is imported
1718
+ // For Python version 3, PyInit_{module_name} must be used as this function is called when the module is imported
1717
1719
PyMODINIT_FUNC PyInit_riptide_cpp () {
1718
1720
1719
1721
INT32 count = 0 ;
@@ -1765,7 +1767,7 @@ count++;
1765
1767
}
1766
1768
1767
1769
1768
- // Build LUTs used in comarisons after mask generated
1770
+ // Build LUTs used in comparisons after mask generated
1769
1771
for (int i = 0 ; i < 256 ; i++) {
1770
1772
BYTE* pDest = (BYTE*)&gBooleanLUT64 [i];
1771
1773
for (int j = 0 ; j < 8 ; j++) {
@@ -1918,11 +1920,24 @@ count++;
1918
1920
pRow->dtype1 = NPY_ULONGLONG;
1919
1921
pRow->dtype2 = NPY_LONGLONG;
1920
1922
1923
+ // Register types defined by this module.
1924
+ PyObject* mod_dict = PyModule_GetDict (m);
1925
+ if (!mod_dict)
1926
+ {
1927
+ LOGGING (" Unable to get the module dictionary for the riptide_cpp module.\n " )
1928
+ return NULL ;
1929
+ }
1930
+
1931
+ if (!RegisterSdsPythonTypes (mod_dict))
1932
+ {
1933
+ LOGGING (" An error occurred when creating/registering SDS Python types." );
1934
+ return NULL ;
1935
+ }
1921
1936
1922
1937
// start up the worker threads now in case we use them
1923
1938
g_cMathWorker->StartWorkerThreads (0 );
1924
1939
1925
- LOGGING (" Fastmath loaded\n " );
1940
+ LOGGING (" riptide_cpp loaded\n " );
1926
1941
return m;
1927
1942
}
1928
1943
0 commit comments