diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2009-01-13 17:22:27 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2009-01-13 17:22:27 +0100 |
| commit | 38d602dc83006c51dfe4ed594d691ea9b0679498 (patch) | |
| tree | b7aedfba82c44cad6c3012f879b5d6d7e8ad1425 /python/string.cc | |
| parent | 12cf58d12b969010f3d98b2974d72bbb950b775f (diff) | |
| parent | 614897f798d9f16591fbd29ebe2a6c5674102d2d (diff) | |
| download | python-apt-38d602dc83006c51dfe4ed594d691ea9b0679498.tar.gz | |
* apt/*.py:
- Almost complete cleanup of the code
- Remove inconsistent use of tabs and spaces (Closes: #505443)
- Improved documentation
* apt/debfile.py:
- Drop get*() methods, as they are deprecated and were
never in a stable release
- Make DscSrcPackage working
* apt/gtk/widgets.py:
- Fix the code and document the signals
* Introduce new documentation build with Sphinx
- Contains style Guide (Closes: #481562)
- debian/rules: Build the documentation here
- setup.py: Remove pydoc building and add new docs.
- debian/examples: Include examples from documentation
- debian/python-apt.docs:
+ Change html/ to build/doc/html.
+ Add build/doc/text for the text-only documentation
* setup.py:
- Only create build/data when building, not all the time
- Remove build/mo and build/data on clean -a
* debian/control:
- Remove the Conflicts on python2.3-apt, python2.4-apt, as
they are only needed for oldstable (sarge)
- Build-Depend on python-sphinx (>= 0.5)
* aptsources/distinfo.py:
- Allow @ in mirror urls (Closes: #478171) (LP: #223097)
* Merge Ben Finney's whitespace changes (Closes: #481563)
* Merge Ben Finney's do not use has_key() (Closes: #481878)
* Do not use deprecated form of raise statement (Closes: #494259)
* Add support for PkgRecords.SHA256Hash (Closes: #456113)
Diffstat (limited to 'python/string.cc')
| -rw-r--r-- | python/string.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/python/string.cc b/python/string.cc index 1fa5a901..8168ea5b 100644 --- a/python/string.cc +++ b/python/string.cc @@ -3,22 +3,22 @@ // $Id: string.cc,v 1.3 2002/01/08 06:53:04 jgg Exp $ /* ###################################################################### - string - Mappings for the string functions that are worthwile for + string - Mappings for the string functions that are worthwile for Python users - + ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ #include "apt_pkgmodule.h" #include "generic.h" - + #include <apt-pkg/strutl.h> #include <Python.h> /*}}}*/ - + // Templated function /*{{{*/ -/* Macro for the generic string in string out function */ +/* Macro for the generic string in string out function */ #define MkStr(Python,CFunc) \ PyObject *Python(PyObject *Self,PyObject *Args) \ { \ @@ -36,7 +36,7 @@ PyObject *Python(PyObject *Self,PyObject *Args) \ return 0; \ return CppPyString(CFunc(Val)); \ } - + MkStr(StrDeQuote,DeQuoteString); MkStr(StrBase64Encode,Base64Encode); MkStr(StrURItoFileName,URItoFileName); @@ -58,7 +58,7 @@ PyObject *StrSizeToStr(PyObject *Self,PyObject *Args) return CppPyString(SizeToStr(PyLong_AsDouble(Obj))); if (PyFloat_Check(Obj)) return CppPyString(SizeToStr(PyFloat_AsDouble(Obj))); - + PyErr_SetString(PyExc_TypeError,"Only understand integers and floats"); return 0; } @@ -69,14 +69,14 @@ PyObject *StrQuoteString(PyObject *Self,PyObject *Args) char *Bad = 0; if (PyArg_ParseTuple(Args,"ss",&Str,&Bad) == 0) return 0; - return CppPyString(QuoteString(Str,Bad)); + return CppPyString(QuoteString(Str,Bad)); } PyObject *StrStringToBool(PyObject *Self,PyObject *Args) { char *Str = 0; if (PyArg_ParseTuple(Args,"s",&Str) == 0) - return 0; + return 0; return Py_BuildValue("i",StringToBool(Str)); } @@ -85,14 +85,14 @@ PyObject *StrStrToTime(PyObject *Self,PyObject *Args) char *Str = 0; if (PyArg_ParseTuple(Args,"s",&Str) == 0) return 0; - + time_t Result; if (StrToTime(Str,Result) == false) { Py_INCREF(Py_None); return Py_None; } - + return Py_BuildValue("i",Result); } |
