Changeset 1985


Ignore:
Timestamp:
Jun 15, 2006, 2:06:38 AM (15 years ago)
Author:
orlov
Message:
  • Added creation of Expr from wide character array.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/runtime/rf_char.cc

    r1898 r1985  
    22#include "rf_expr.ih"
    33#include "rf_types.ih"
     4#include "rf_short_int.ih"
     5#include "rf_integer.ih"
    46
    57namespace rftype
     
    1618  while (len--)
    1719    new(p++) Char(*pstr++);
     20  return e;
     21}
     22
     23Expr Char::create_expr (wchar_t const* _wstr, size_t _len /* = (size_t)-1 */)
     24{
     25  size_t len = _len == (size_t)-1 ? wcslen(_wstr) : _len;
     26
     27  Expr  e = Term::create_flat_expr(len);
     28  Term* p = e.get_first();
     29
     30  while (len--)
     31    new(p++) Char(*_wstr++);
    1832  return e;
    1933}
Note: See TracChangeset for help on using the changeset viewer.