summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-11-24 10:00:18 +0000
committerArch Librarian <arch@canonical.com>2004-11-24 10:00:18 +0000
commit8d69127bf89691cec365780ccc10d6ee5be7332e (patch)
tree727ff8024d530ce7950da8c0b70134efe7a57a8e /python
parentedd251528cddb41b2e378c33b7092f845f31374a (diff)
downloadpython-apt-8d69127bf89691cec365780ccc10d6ee5be7332e.tar.gz
Alfredo's no_proxy patch
Author: jgg Date: 2001-02-23 05:46:02 GMT Alfredo's no_proxy patch
Diffstat (limited to 'python')
-rw-r--r--python/apt_pkgmodule.cc3
-rw-r--r--python/apt_pkgmodule.h5
-rw-r--r--python/string.cc12
3 files changed, 16 insertions, 4 deletions
diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc
index ded265aa..d48eed0b 100644
--- a/python/apt_pkgmodule.cc
+++ b/python/apt_pkgmodule.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt_pkgmodule.cc,v 1.1 2001/02/20 06:32:01 jgg Exp $
+// $Id: apt_pkgmodule.cc,v 1.2 2001/02/23 05:46:02 jgg Exp $
/* ######################################################################
apt_pkgmodule - Top level for the python module. Create the internal
@@ -279,6 +279,7 @@ static PyMethodDef methods[] =
{"md5sum",md5sum,METH_VARARGS,doc_md5sum},
// Strings
+ {"CheckDomainList",StrCheckDomainList,METH_VARARGS,"CheckDomainList(String,String) -> Bool"},
{"QuoteString",StrQuoteString,METH_VARARGS,"QuoteString(String,String) -> String"},
{"DeQuoteString",StrDeQuote,METH_VARARGS,"DeQuoteString(String) -> String"},
{"SizeToStr",StrSizeToStr,METH_VARARGS,"SizeToStr(int) -> String"},
diff --git a/python/apt_pkgmodule.h b/python/apt_pkgmodule.h
index 5398bd96..54eb1ec0 100644
--- a/python/apt_pkgmodule.h
+++ b/python/apt_pkgmodule.h
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt_pkgmodule.h,v 1.1 2001/02/20 06:32:01 jgg Exp $
+// $Id: apt_pkgmodule.h,v 1.2 2001/02/23 05:46:02 jgg Exp $
/* ######################################################################
Prototypes for the module
@@ -48,7 +48,8 @@ PyObject *StrBase64Encode(PyObject *self,PyObject *Args);
PyObject *StrStringToBool(PyObject *self,PyObject *Args);
PyObject *StrTimeRFC1123(PyObject *self,PyObject *Args);
PyObject *StrStrToTime(PyObject *self,PyObject *Args);
-
+PyObject *StrCheckDomainList(PyObject *Self,PyObject *Args);
+
// Cache Stuff
extern PyTypeObject PkgCacheType;
extern PyTypeObject PkgListType;
diff --git a/python/string.cc b/python/string.cc
index 7564899b..5ad7fddb 100644
--- a/python/string.cc
+++ b/python/string.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: string.cc,v 1.1 2001/02/20 06:32:01 jgg Exp $
+// $Id: string.cc,v 1.2 2001/02/23 05:46:02 jgg Exp $
/* ######################################################################
string - Mappings for the string functions that are worthwile for
@@ -93,4 +93,14 @@ PyObject *StrStrToTime(PyObject *Self,PyObject *Args)
return Py_BuildValue("i",Result);
}
+
+PyObject *StrCheckDomainList(PyObject *Self,PyObject *Args)
+{
+ char *Host = 0;
+ char *List = 0;
+ if (PyArg_ParseTuple(Args,"ss",&Host,&List) == 0)
+ return 0;
+ return Py_BuildValue("i",CheckDomainList(Host,List));
+}
+
/*}}}*/