From 8d69127bf89691cec365780ccc10d6ee5be7332e Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Wed, 24 Nov 2004 10:00:18 +0000 Subject: Alfredo's no_proxy patch Author: jgg Date: 2001-02-23 05:46:02 GMT Alfredo's no_proxy patch --- python/apt_pkgmodule.cc | 3 ++- python/apt_pkgmodule.h | 5 +++-- python/string.cc | 12 +++++++++++- 3 files changed, 16 insertions(+), 4 deletions(-) (limited to 'python') 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)); +} + /*}}}*/ -- cgit v1.2.3