[clisp] SF #3148200 Fix segfault parsing nested unions.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12428 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2011-02-04 19:43:24 +00:00
commit 867e6a9986
2 changed files with 12 additions and 7 deletions

View file

@ -5,6 +5,9 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 2.0.2 (in progress)
===========================
2011-02-04: wsfulton
[clisp] SF #3148200 Fix segfault parsing nested unions.
2011-02-01: wsfulton
[C#] Directors - a call to a method being defined in the base class, not
overridden in a subclass, but again overridden in a class derived from

View file

@ -293,16 +293,18 @@ int CLISP::classDeclaration(Node *n) {
}
String *temp = Copy(Getattr(c, "decl"));
Append(temp, Getattr(c, "type")); //appending type to the end, otherwise wrong type
String *lisp_type = get_ffi_type(n, temp);
Delete(temp);
if (temp) {
Append(temp, Getattr(c, "type")); //appending type to the end, otherwise wrong type
String *lisp_type = get_ffi_type(n, temp);
Delete(temp);
String *slot_name = Getattr(c, "sym:name");
Printf(f_cl, "\n\t(%s %s)", slot_name, lisp_type);
String *slot_name = Getattr(c, "sym:name");
Printf(f_cl, "\n\t(%s %s)", slot_name, lisp_type);
Append(entries, NewStringf("%s-%s", name, slot_name));
Append(entries, NewStringf("%s-%s", name, slot_name));
Delete(lisp_type);
Delete(lisp_type);
}
}
Printf(f_cl, ")\n");