summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Elstner <daniel@src.gnome.org>2009-03-09 17:43:04 +0000
committerDaniel Elstner <daniel@src.gnome.org>2009-03-09 17:43:04 +0000
commit0931277348aec3d91fa1a4f93beb93825c2fbd8d (patch)
tree3508075288a781fd4560cd080d21488511cb9225
parentdd363337746ec2148d5eb2dc901928cbbc577e6c (diff)
downloadglibmm-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--ChangeLog6
-rw-r--r--tools/extra_defs_gen/generate_extra_defs.cc11
2 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 07f62317..b9f8dc83 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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";