diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-06-25 16:44:33 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-06-25 16:44:33 +0200 |
| commit | b0e6c5bdad8b182d4144ccf929e919bb687ac98c (patch) | |
| tree | 758f40d99fe4871c285d822e9d65d671c05bf400 /python | |
| parent | c41d1e0c66ab4effdf737ca4c9a9c86c08237451 (diff) | |
| download | python-apt-b0e6c5bdad8b182d4144ccf929e919bb687ac98c.tar.gz | |
python/policy.cc: Use strcmp() for comparing strings.
Diffstat (limited to 'python')
| -rw-r--r-- | python/policy.cc | 6 |
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; |
