summaryrefslogtreecommitdiff
path: root/python/apt_pkgmodule.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-06-04 17:18:29 +0200
committerJulian Andres Klode <jak@debian.org>2009-06-04 17:18:29 +0200
commit884c8a4ebdfcedf8143dcb2ce8ef92779c353e06 (patch)
tree2dd2bbb2c5a8804aa926852fac16c93a5b4a0607 /python/apt_pkgmodule.cc
parent34f5670f3af2b04a4a575695584e46e4bf4106e9 (diff)
downloadpython-apt-884c8a4ebdfcedf8143dcb2ce8ef92779c353e06.tar.gz
python/: Unify naming conventions for all new names.
Unify all names to follow these rules: 1. Replace the first [A-Z] with the lowercase version [a-z] 2. Replace multiple [A-Z] with [A-Z][a-z] (one upper, remaining ones lowercase) 3. Replace all remaining [A-Z] with _[a-z] This brings us from 'FileName' to 'file_name' and from 'DescURI' to 'desc_uri'. We will at a later stage add some exceptions to this rule, like 'filename' instead of 'file_name', to improve readability.
Diffstat (limited to 'python/apt_pkgmodule.cc')
-rw-r--r--python/apt_pkgmodule.cc36
1 files changed, 18 insertions, 18 deletions
diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc
index 44234f8d..8259d7c3 100644
--- a/python/apt_pkgmodule.cc
+++ b/python/apt_pkgmodule.cc
@@ -407,7 +407,7 @@ static PyMethodDef methods[] =
// Locking
{"get_lock",GetLock,METH_VARARGS,doc_GetLock},
{"pkgsystem_lock",PkgSystemLock,METH_VARARGS,doc_PkgSystemLock},
- {"pkgsystem_unlock",PkgSystemUnLock,METH_VARARGS,doc_PkgSystemUnLock},
+ {"pkgsystem_un_lock",PkgSystemUnLock,METH_VARARGS,doc_PkgSystemUnLock},
#ifdef COMPAT_0_7
{"GetLock",GetLock,METH_VARARGS,doc_GetLock},
{"PkgSystemLock",PkgSystemLock,METH_VARARGS,doc_PkgSystemLock},
@@ -415,10 +415,10 @@ static PyMethodDef methods[] =
#endif
// Command line
- {"read_configfile",LoadConfig,METH_VARARGS,doc_LoadConfig},
- {"read_configdir",LoadConfigDir,METH_VARARGS,doc_LoadConfigDir},
- {"read_configfile_isc",LoadConfigISC,METH_VARARGS,doc_LoadConfig},
- {"parse_commandline",ParseCommandLine,METH_VARARGS,doc_ParseCommandLine},
+ {"read_config_file",LoadConfig,METH_VARARGS,doc_LoadConfig},
+ {"read_config_dir",LoadConfigDir,METH_VARARGS,doc_LoadConfigDir},
+ {"read_config_file_isc",LoadConfigISC,METH_VARARGS,doc_LoadConfig},
+ {"parse_command_line",ParseCommandLine,METH_VARARGS,doc_ParseCommandLine},
#ifdef COMPAT_0_7
{"ReadConfigFile",LoadConfig,METH_VARARGS,doc_LoadConfig},
{"ReadConfigDir",LoadConfigDir,METH_VARARGS,doc_LoadConfigDir},
@@ -438,7 +438,7 @@ static PyMethodDef methods[] =
// Depends
{"parse_depends",ParseDepends,METH_VARARGS,doc_ParseDepends},
- {"parse_srcdepends",ParseSrcDepends,METH_VARARGS,doc_ParseDepends},
+ {"parse_src_depends",ParseSrcDepends,METH_VARARGS,doc_ParseDepends},
#ifdef COMPAT_0_7
{"ParseDepends",ParseDepends,METH_VARARGS,doc_ParseDepends},
{"ParseSrcDepends",ParseSrcDepends,METH_VARARGS,doc_ParseDepends},
@@ -450,12 +450,12 @@ static PyMethodDef methods[] =
{"sha256sum",sha256sum,METH_VARARGS,doc_sha256sum},
// Strings
- {"check_domainlist",StrCheckDomainList,METH_VARARGS,"CheckDomainList(String,String) -> Bool"},
+ {"check_domain_list",StrCheckDomainList,METH_VARARGS,"CheckDomainList(String,String) -> Bool"},
{"quote_string",StrQuoteString,METH_VARARGS,"QuoteString(String,String) -> String"},
- {"dequote_string",StrDeQuote,METH_VARARGS,"DeQuoteString(String) -> String"},
+ {"de_quote_string",StrDeQuote,METH_VARARGS,"DeQuoteString(String) -> String"},
{"size_to_str",StrSizeToStr,METH_VARARGS,"SizeToStr(int) -> String"},
{"time_to_str",StrTimeToStr,METH_VARARGS,"TimeToStr(int) -> String"},
- {"uri_to_filename",StrURItoFileName,METH_VARARGS,"URItoFileName(String) -> String"},
+ {"uri_to_file_name",StrURItoFileName,METH_VARARGS,"URItoFileName(String) -> String"},
{"base64_encode",StrBase64Encode,METH_VARARGS,"Base64Encode(String) -> String"},
{"string_to_bool",StrStringToBool,METH_VARARGS,"StringToBool(String) -> int"},
{"time_rfc1123",StrTimeRFC1123,METH_VARARGS,"TimeRFC1123(int) -> String"},
@@ -644,7 +644,7 @@ extern "C" void initapt_pkg()
// My constants
PyModule_AddIntConstant(Module,"DEP_DEPENDS",pkgCache::Dep::Depends);
- PyModule_AddIntConstant(Module,"DEP_PREDEPENDS",pkgCache::Dep::PreDepends);
+ PyModule_AddIntConstant(Module,"DEP_PRE_DEPENDS",pkgCache::Dep::PreDepends);
PyModule_AddIntConstant(Module,"DEP_SUGGESTS",pkgCache::Dep::Suggests);
PyModule_AddIntConstant(Module,"DEP_RECOMMENDS",pkgCache::Dep::Recommends);
PyModule_AddIntConstant(Module,"DEP_CONFLICTS",pkgCache::Dep::Conflicts);
@@ -673,23 +673,23 @@ extern "C" void initapt_pkg()
PyModule_AddIntConstant(Module,"PriExtra",pkgCache::State::Extra);
#endif
// CurState
- PyModule_AddIntConstant(Module,"CURSTATE_NOTINSTALLED",pkgCache::State::NotInstalled);
- PyModule_AddIntConstant(Module,"CURSTATE_UNPACKED",pkgCache::State::UnPacked);
- PyModule_AddIntConstant(Module,"CURSTATE_HALFCONFIGURED",pkgCache::State::HalfConfigured);
- PyModule_AddIntConstant(Module,"CURSTATE_HALFINSTALLED",pkgCache::State::HalfInstalled);
- PyModule_AddIntConstant(Module,"CURSTATE_CONFIGFILES",pkgCache::State::ConfigFiles);
+ PyModule_AddIntConstant(Module,"CURSTATE_NOT_INSTALLED",pkgCache::State::NotInstalled);
+ PyModule_AddIntConstant(Module,"CURSTATE_UN_PACKED",pkgCache::State::UnPacked);
+ PyModule_AddIntConstant(Module,"CURSTATE_HALF_CONFIGURED",pkgCache::State::HalfConfigured);
+ PyModule_AddIntConstant(Module,"CURSTATE_HALF_INSTALLED",pkgCache::State::HalfInstalled);
+ PyModule_AddIntConstant(Module,"CURSTATE_CONFIG_FILES",pkgCache::State::ConfigFiles);
PyModule_AddIntConstant(Module,"CURSTATE_INSTALLED",pkgCache::State::Installed);
// SelState
PyModule_AddIntConstant(Module,"SELSTATE_UNKNOWN",pkgCache::State::Unknown);
PyModule_AddIntConstant(Module,"SELSTATE_INSTALL",pkgCache::State::Install);
PyModule_AddIntConstant(Module,"SELSTATE_HOLD",pkgCache::State::Hold);
- PyModule_AddIntConstant(Module,"SELSTATE_DEINSTALL",pkgCache::State::DeInstall);
+ PyModule_AddIntConstant(Module,"SELSTATE_DE_INSTALL",pkgCache::State::DeInstall);
PyModule_AddIntConstant(Module,"SELSTATE_PURGE",pkgCache::State::Purge);
// InstState
PyModule_AddIntConstant(Module,"INSTSTATE_OK",pkgCache::State::Ok);
- PyModule_AddIntConstant(Module,"INSTSTATE_REINSTREQ",pkgCache::State::ReInstReq);
+ PyModule_AddIntConstant(Module,"INSTSTATE_RE_INST_REQ",pkgCache::State::ReInstReq);
PyModule_AddIntConstant(Module,"INSTSTATE_HOLD",pkgCache::State::Hold);
- PyModule_AddIntConstant(Module,"INSTSTATE_HOLD_REINSTREQ",pkgCache::State::HoldReInstReq);
+ PyModule_AddIntConstant(Module,"INSTSTATE_HOLD_RE_INST_REQ",pkgCache::State::HoldReInstReq);
#ifdef COMPAT_0_7
PyModule_AddIntConstant(Module,"CurStateNotInstalled",pkgCache::State::NotInstalled);