summaryrefslogtreecommitdiff
path: root/python/policy.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-06-25 16:44:33 +0200
committerJulian Andres Klode <jak@debian.org>2009-06-25 16:44:33 +0200
commitb0e6c5bdad8b182d4144ccf929e919bb687ac98c (patch)
tree758f40d99fe4871c285d822e9d65d671c05bf400 /python/policy.cc
parentc41d1e0c66ab4effdf737ca4c9a9c86c08237451 (diff)
downloadpython-apt-b0e6c5bdad8b182d4144ccf929e919bb687ac98c.tar.gz
python/policy.cc: Use strcmp() for comparing strings.
Diffstat (limited to 'python/policy.cc')
-rw-r--r--python/policy.cc6
1 files changed, 3 insertions, 3 deletions
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<pkgPolicy *>(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;