summaryrefslogtreecommitdiff
path: root/Source/Modules/chicken.cxx
diff options
context:
space:
mode:
authorJohn Lenz <jlenz2@math.uiuc.edu>2007-10-26 23:08:34 +0000
committerJohn Lenz <jlenz2@math.uiuc.edu>2007-10-26 23:08:34 +0000
commit4ace915a569811a3dcd5a1771627ae2ca42db408 (patch)
treeee93e30f85cbc773d215e327378335c5642339ba /Source/Modules/chicken.cxx
parentc6b4403b40e2bee05f52fa5466dd460b05d4e23c (diff)
downloadswig-4ace915a569811a3dcd5a1771627ae2ca42db408.tar.gz
Chicken test suite now runs with no errors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10054 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Source/Modules/chicken.cxx')
-rw-r--r--Source/Modules/chicken.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/Modules/chicken.cxx b/Source/Modules/chicken.cxx
index 0102b0ab2..df36707df 100644
--- a/Source/Modules/chicken.cxx
+++ b/Source/Modules/chicken.cxx
@@ -876,18 +876,18 @@ int CHICKEN::constantWrapper(Node *n) {
/* Special hook for member pointer */
if (SwigType_type(t) == T_MPOINTER) {
- Printf(f_header, "static %s = %s;\n", SwigType_str(t, wname), rvalue);
- value = wname;
- }
- if ((tm = Swig_typemap_lookup_new("constcode", n, name, 0))) {
- Replaceall(tm, "$source", rvalue);
- Replaceall(tm, "$target", source);
- Replaceall(tm, "$result", source);
- Replaceall(tm, "$value", rvalue);
- Printf(f_header, "%s\n", tm);
+ Printf(f_header, "static %s = %s;\n", SwigType_str(t, source), rvalue);
} else {
- Swig_warning(WARN_TYPEMAP_CONST_UNDEF, input_file, line_number, "Unsupported constant value.\n");
- return SWIG_NOWRAP;
+ if ((tm = Swig_typemap_lookup_new("constcode", n, name, 0))) {
+ Replaceall(tm, "$source", rvalue);
+ Replaceall(tm, "$target", source);
+ Replaceall(tm, "$result", source);
+ Replaceall(tm, "$value", rvalue);
+ Printf(f_header, "%s\n", tm);
+ } else {
+ Swig_warning(WARN_TYPEMAP_CONST_UNDEF, input_file, line_number, "Unsupported constant value.\n");
+ return SWIG_NOWRAP;
+ }
}
f = NewWrapper();