From b0e6c5bdad8b182d4144ccf929e919bb687ac98c Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 25 Jun 2009 16:44:33 +0200 Subject: python/policy.cc: Use strcmp() for comparing strings. --- python/policy.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python/policy.cc') diff --git a/python/policy.cc b/python/policy.cc index 39bbc1a3..5150af91 100644 --- a/python/policy.cc +++ b/python/policy.cc @@ -111,11 +111,11 @@ static PyObject *Policy_CreatePin(PyObject *self, PyObject *args) { if (PyArg_ParseTuple(args, "sssh", &type, &pkg, &data, &priority) == 0) return 0; pkgPolicy *policy = GetCpp(self); - if (type == "Version" || type == "version") + if (strcmp(type,"Version") == 0 || strcmp(type, "version") == 0) match_type = pkgVersionMatch::Version; - if (type == "Release" || type == "release") + if (strcmp(type,"Release") == 0 || strcmp(type, "release") == 0) match_type = pkgVersionMatch::Release; - if (type == "Origin" || type == "origin") + if (strcmp(type,"Origin") == 0 || strcmp(type, "origin") == 0) match_type = pkgVersionMatch::Origin; else match_type = pkgVersionMatch::None; -- cgit v1.2.3