return FALSE;
}
+METHOD(backtrace_t, equals, bool,
+ private_backtrace_t *this, backtrace_t *other_public)
+{
+ private_backtrace_t *other = (private_backtrace_t*)other_public;
+ int i;
+
+ if (this == other)
+ {
+ return TRUE;
+ }
+ if (this->frame_count != other->frame_count)
+ {
+ return FALSE;
+ }
+ for (i = 0; i < this->frame_count; i++)
+ {
+ if (this->frames[i] != other->frames[i])
+ {
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
METHOD(backtrace_t, destroy, void,
private_backtrace_t *this)
{
this->public = (backtrace_t) {
.log = _log_,
.contains_function = _contains_function,
+ .equals = _equals,
.destroy = _destroy,
};
bool (*contains_function)(backtrace_t *this, char *function[], int count);
/**
+ * Check two backtraces for equality.
+ *
+ * @param other backtrace to compare to this
+ * @return TRUE if backtraces are equal
+ */
+ bool (*equals)(backtrace_t *this, backtrace_t *other);
+
+ /**
* Destroy a backtrace instance.
*/
void (*destroy)(backtrace_t *this);