summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2013-12-05 21:21:07 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2013-12-05 21:21:07 +0000
commit6d97335d946a8042e84357d80ddbb67b8118696a (patch)
tree4d3d55d5f2a14918c6a3e59a6b200c1109bee6f9 /Source
parent7103a0684961a5b19e6ef5502823332b8936a0c2 (diff)
downloadswig-6d97335d946a8042e84357d80ddbb67b8118696a.tar.gz
Minor tweaks in Swig_feature_set
Diffstat (limited to 'Source')
-rw-r--r--Source/Modules/main.cxx4
-rw-r--r--Source/Swig/naming.c2
-rw-r--r--Source/Swig/swig.h2
3 files changed, 3 insertions, 5 deletions
diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx
index 62d9c0c36..aa7e83ef8 100644
--- a/Source/Modules/main.cxx
+++ b/Source/Modules/main.cxx
@@ -863,9 +863,7 @@ void SWIG_getoptions(int argc, char *argv[]) {
}
static void flatten_nested() {
- String *val = NewString("1");
- Swig_feature_set(Swig_cparse_features(), "", 0, "feature:flatnested", val, 0);
- Delete(val);
+ Swig_feature_set(Swig_cparse_features(), "", 0, "feature:flatnested", "1", 0);
}
diff --git a/Source/Swig/naming.c b/Source/Swig/naming.c
index 2921b3c84..9e2b4a436 100644
--- a/Source/Swig/naming.c
+++ b/Source/Swig/naming.c
@@ -774,7 +774,7 @@ void Swig_features_get(Hash *features, String *prefix, String *name, SwigType *d
* concatenating the feature name plus ':' plus the attribute name.
* ----------------------------------------------------------------------------- */
-void Swig_feature_set(Hash *features, const_String_or_char_ptr name, SwigType *decl, const_String_or_char_ptr featurename, String *value, Hash *featureattribs) {
+void Swig_feature_set(Hash *features, const_String_or_char_ptr name, SwigType *decl, const_String_or_char_ptr featurename, const_String_or_char_ptr value, Hash *featureattribs) {
Hash *n;
Hash *fhash;
diff --git a/Source/Swig/swig.h b/Source/Swig/swig.h
index 28a3ba730..95d9189b3 100644
--- a/Source/Swig/swig.h
+++ b/Source/Swig/swig.h
@@ -304,7 +304,7 @@ extern int ParmList_is_compactdefargs(ParmList *p);
extern DOH *Swig_name_object_get(Hash *namehash, String *prefix, String *name, SwigType *decl);
extern void Swig_name_object_inherit(Hash *namehash, String *base, String *derived);
extern void Swig_features_get(Hash *features, String *prefix, String *name, SwigType *decl, Node *n);
- extern void Swig_feature_set(Hash *features, const_String_or_char_ptr name, SwigType *decl, const_String_or_char_ptr featurename, String *value, Hash *featureattribs);
+ extern void Swig_feature_set(Hash *features, const_String_or_char_ptr name, SwigType *decl, const_String_or_char_ptr featurename, const_String_or_char_ptr value, Hash *featureattribs);
/* --- Misc --- */
extern char *Swig_copy_string(const char *c);