diff options
author | Daniel Elstner <daniel@src.gnome.org> | 2009-03-09 17:43:04 +0000 |
---|---|---|
committer | Daniel Elstner <daniel@src.gnome.org> | 2009-03-09 17:43:04 +0000 |
commit | 0931277348aec3d91fa1a4f93beb93825c2fbd8d (patch) | |
tree | 3508075288a781fd4560cd080d21488511cb9225 | |
parent | dd363337746ec2148d5eb2dc901928cbbc577e6c (diff) | |
download | glibmm-0931277348aec3d91fa1a4f93beb93825c2fbd8d.tar.gz |
Replace nested double quotes in the docs string by single quotes to ease
* tools/extra_defs_gen/generate_extra_defs.cc (get_properties):
Replace nested double quotes in the docs string by single quotes
to ease the parsing pain of gmmproc.
svn path=/trunk/; revision=792
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | tools/extra_defs_gen/generate_extra_defs.cc | 11 |
2 files changed, 13 insertions, 4 deletions
@@ -1,3 +1,9 @@ +2009-03-09 Daniel Elstner <danielk@openismus.com> + + * tools/extra_defs_gen/generate_extra_defs.cc (get_properties): + Replace nested double quotes in the docs string by single quotes + to ease the parsing pain of gmmproc. + 2.19.8: 2009-02-23 Murray Cumming <murrayc@murrayc.com> diff --git a/tools/extra_defs_gen/generate_extra_defs.cc b/tools/extra_defs_gen/generate_extra_defs.cc index ce860366..61b57223 100644 --- a/tools/extra_defs_gen/generate_extra_defs.cc +++ b/tools/extra_defs_gen/generate_extra_defs.cc @@ -21,6 +21,7 @@ #include "generate_extra_defs.h" +#include <algorithm> std::string get_properties(GType gtype) { @@ -66,11 +67,13 @@ std::string get_properties(GType gtype) if(pParamSpec) { //Name and type: - std::string strName = g_param_spec_get_name(pParamSpec); - std::string strTypeName = G_PARAM_SPEC_TYPE_NAME(pParamSpec); - + const std::string strName = g_param_spec_get_name(pParamSpec); + const std::string strTypeName = G_PARAM_SPEC_TYPE_NAME(pParamSpec); + const gchar* pchBlurb = g_param_spec_get_blurb(pParamSpec); - std::string strDocs = (pchBlurb ? pchBlurb : std::string()); + std::string strDocs = (pchBlurb) ? pchBlurb : ""; + // Quick hack to get rid of nested double quotes: + std::replace(strDocs.begin(), strDocs.end(), '"', '\''); strResult += "(define-property " + strName + "\n"; strResult += " (of-object \"" + strObjectName + "\")\n"; |