Mercurial > octave
comparison src/ov-fcn-inline.cc @ 4954:ed0f3cb6d3d4
[project @ 2004-09-01 21:24:53 by jwe]
author | jwe |
---|---|
date | Wed, 01 Sep 2004 21:24:54 +0000 |
parents | cd58733c326b |
children | 0ab18cbe8b5f |
comparison
equal
deleted
inserted
replaced
4953:7a3a480e8645 | 4954:ed0f3cb6d3d4 |
---|---|
53 const string_vector& a, | 53 const string_vector& a, |
54 const std::string& n) | 54 const std::string& n) |
55 : octave_fcn_handle (0, n), iftext (f), ifargs (a) | 55 : octave_fcn_handle (0, n), iftext (f), ifargs (a) |
56 { | 56 { |
57 // Find a function name that isn't already in the symbol table. | 57 // Find a function name that isn't already in the symbol table. |
58 | 58 std::string fname = unique_symbol_name ("__inline__"); |
59 std::string fname = "__inline__"; | |
60 | |
61 while (symbol_exist (fname)) | |
62 fname.append ("X"); | |
63 | 59 |
64 // Form a string representing the function. | 60 // Form a string representing the function. |
65 | 61 |
66 OSSTREAM buf; | 62 OSSTREAM buf; |
67 | 63 |
89 | 85 |
90 if (tmp.is_function ()) | 86 if (tmp.is_function ()) |
91 { | 87 { |
92 fcn = tmp; | 88 fcn = tmp; |
93 | 89 |
94 // XXX FIXME XXX -- probably shouldn't be directly altering the | 90 clear_function (fname); |
95 // symbol table here. | |
96 | |
97 fbi_sym_tab->clear_function (fname); | |
98 } | 91 } |
99 else | 92 else |
100 error ("inline: unable to define function"); | 93 error ("inline: unable to define function"); |
101 } | 94 } |
102 | 95 |