Switch to side-by-side view

--- a/src/python/recoll/pyrecoll.cpp
+++ b/src/python/recoll/pyrecoll.cpp
@@ -55,15 +55,15 @@
 typedef struct {
     PyObject_HEAD
     /* Type-specific fields go here. */
-    RefCntr<Rcl::SearchData> sd;
+    STD_SHARED_PTR<Rcl::SearchData> sd;
 } recoll_SearchDataObject;
 
 static void 
 SearchData_dealloc(recoll_SearchDataObject *self)
 {
     LOGDEB(("SearchData_dealloc. Releasing. Count before: %d\n",
-            self->sd.getcnt()));
-    self->sd.release();
+            self->sd.use_count()));
+    self->sd.reset();
     Py_TYPE(self)->tp_free((PyObject*)self);
 }
 
@@ -108,7 +108,7 @@
     } else {
 	stemlang = "english";
     }
-    self->sd = RefCntr<Rcl::SearchData>(new Rcl::SearchData(tp, stemlang));
+    self->sd = STD_SHARED_PTR<Rcl::SearchData>(new Rcl::SearchData(tp, stemlang));
     return 0;
 }
 
@@ -180,7 +180,7 @@
 		     PyObject *kwargs)
 {
     LOGDEB0(("SearchData_addclause\n"));
-    if (self->sd.isNull()) {
+    if (!self->sd) {
 	LOGERR(("SearchData_addclause: not init??\n"));
         PyErr_SetString(PyExc_AttributeError, "sd");
         return 0;
@@ -951,7 +951,7 @@
 	return 0;
     }
 
-    RefCntr<Rcl::SearchData> rq(sd);
+    STD_SHARED_PTR<Rcl::SearchData> rq(sd);
     self->query->setSortBy(*self->sortfield, self->ascending);
     self->query->setQuery(rq);
     int cnt = self->query->getResCnt();
@@ -1222,8 +1222,8 @@
 	return 0;
     }
 
-    RefCntr<Rcl::SearchData> sd = self->query->getSD();
-    if (sd.isNull()) {
+    STD_SHARED_PTR<Rcl::SearchData> sd = self->query->getSD();
+    if (!sd) {
 	PyErr_SetString(PyExc_ValueError, "Query not initialized");
 	return 0;
     }
@@ -1273,8 +1273,8 @@
         PyErr_SetString(PyExc_AttributeError, "query");
         return 0;
     }
-    RefCntr<Rcl::SearchData> sd = self->query->getSD();
-    if (sd.isNull()) {
+    STD_SHARED_PTR<Rcl::SearchData> sd = self->query->getSD();
+    if (!sd) {
 	PyErr_SetString(PyExc_ValueError, "Query not initialized");
 	return 0;
     }
@@ -1329,8 +1329,8 @@
         PyErr_SetString(PyExc_AttributeError, "query");
 	return 0;
     }
-    RefCntr<Rcl::SearchData> sd = self->query->getSD();
-    if (sd.isNull()) {
+    STD_SHARED_PTR<Rcl::SearchData> sd = self->query->getSD();
+    if (!sd) {
 	PyErr_SetString(PyExc_ValueError, "Query not initialized");
 	return 0;
     }
@@ -1357,8 +1357,8 @@
         PyErr_SetString(PyExc_AttributeError, "query");
 	return 0;
     }
-    RefCntr<Rcl::SearchData> sd = self->query->getSD();
-    if (sd.isNull()) {
+    STD_SHARED_PTR<Rcl::SearchData> sd = self->query->getSD();
+    if (!sd) {
 	PyErr_SetString(PyExc_ValueError, "Query not initialized");
 	return 0;
     }