summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2016-01-10 20:19:35 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2016-01-10 20:19:35 +0000
commit2d094d7d9ffb14e25258025c3b44c001b466468f (patch)
tree58961c20d65cb3921eb2ec8e24a5d5b15698ae47
parent982b14370f2132463ebe0666d329854a807fc269 (diff)
downloadswig-2d094d7d9ffb14e25258025c3b44c001b466468f.tar.gz
Alternative solution for Ruby unbalanced braces
-rw-r--r--Source/Modules/ruby.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/Modules/ruby.cxx b/Source/Modules/ruby.cxx
index d21fe0fbb..216d4ef27 100644
--- a/Source/Modules/ruby.cxx
+++ b/Source/Modules/ruby.cxx
@@ -1739,14 +1739,13 @@ public:
/* Now write the wrapper function itself */
if (current == CONSTRUCTOR_ALLOCATE) {
+ Printv(f->def, "SWIGINTERN VALUE\n", NIL);
Printf(f->def, "#ifdef HAVE_RB_DEFINE_ALLOC_FUNC\n");
- Printv(f->def, "SWIGINTERN VALUE\n", wname, "(VALUE self) {", NIL);
+ Printv(f->def, wname, "(VALUE self)\n", NIL);
Printf(f->def, "#else\n");
- Printv(f->def, "SWIGINTERN VALUE\n", wname, "(int argc, VALUE *argv, VALUE self) {", NIL);
- Printf(f->def, "#endif\n");
- Printf(f->def, "#if 0\n");
- Printf(f->def, "} /* c-mode */\n");
+ Printv(f->def, wname, "(int argc, VALUE *argv, VALUE self)\n", NIL);
Printf(f->def, "#endif\n");
+ Printv(f->def, "{\n", NIL);
} else if (current == CONSTRUCTOR_INITIALIZE) {
Printv(f->def, "SWIGINTERN VALUE\n", wname, "(int argc, VALUE *argv, VALUE self) {", NIL);
if (!varargs) {