lobject.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613
  1. /*
  2. ** $Id: lobject.h,v 2.117.1.1 2017/04/19 17:39:34 roberto Exp $
  3. ** Type definitions for Lua objects
  4. ** See Copyright Notice in lua.h
  5. */
  6. #ifndef lobject_h
  7. #define lobject_h
  8. #include <stdarg.h>
  9. #include "llimits.h"
  10. #include "lua.h"
  11. /*
  12. ** Extra tags for non-values
  13. */
  14. #define LUA_TPROTO LUA_NUMTAGS /* function prototypes */
  15. #define LUA_TDEADKEY (LUA_NUMTAGS+1) /* removed keys in tables */
  16. /*
  17. ** number of all possible tags (including LUA_TNONE but excluding DEADKEY)
  18. */
  19. #define LUA_TOTALTAGS (LUA_TPROTO + 2)
  20. /*
  21. ** tags for Tagged Values have the following use of bits:
  22. ** bits 0-3: actual tag (a LUA_T* value)
  23. ** bits 4-5: variant bits
  24. ** bit 6: whether value is collectable
  25. */
  26. /*
  27. ** LUA_TFUNCTION variants:
  28. ** 0 - Lua function
  29. ** 1 - light C function
  30. ** 2 - regular C function (closure)
  31. */
  32. /* Variant tags for functions */
  33. #define LUA_TLCL (LUA_TFUNCTION | (0 << 4)) /* Lua closure */
  34. #define LUA_TLCF (LUA_TFUNCTION | (1 << 4)) /* light C function */
  35. #define LUA_TCCL (LUA_TFUNCTION | (2 << 4)) /* C closure */
  36. /* Variant tags for strings */
  37. #define LUA_TSHRSTR (LUA_TSTRING | (0 << 4)) /* short strings */
  38. #define LUA_TLNGSTR (LUA_TSTRING | (1 << 4)) /* long strings */
  39. /* Variant tags for numbers */
  40. #define LUA_TNUMFLT (LUA_TNUMBER | (0 << 4)) /* float numbers */
  41. #define LUA_TNUMINT (LUA_TNUMBER | (1 << 4)) /* integer numbers */
  42. /* Bit mark for collectable types */
  43. #define LUA_TTBLRAM (LUA_TTABLE | (0 << 4)) /* RAM based Table */
  44. #define LUA_TTBLROF (LUA_TTABLE | (1 << 4)) /* RO Flash based ROTable */
  45. /* Bit mark for collectable types */
  46. #define BIT_ISCOLLECTABLE (1 << 6)
  47. /* mark a tag as collectable */
  48. #define ctb(t) ((t) | BIT_ISCOLLECTABLE)
  49. /*
  50. ** Byte field access macro. On ESP targets this causes the compiler to emit
  51. ** a l32i + extui instruction pair instead of a single l8ui avoiding a call
  52. ** the S/W unaligned exception handler. This is used to force aligned access
  53. ** to commonly accessed fields in Flash-based record structures. It is not
  54. ** needed for RAM-only structures.
  55. **
  56. ** wo is the offset of aligned word in bytes 0,4,8,..
  57. ** bo is the field within the word in bits 0..31
  58. */
  59. #ifdef LUA_USE_ESP
  60. #define GET_BYTE_FN(name,t,wo,bo) \
  61. static inline lu_int32 get ## name(const void *o) { \
  62. lu_int32 res; /* extract named field */ \
  63. asm ("l32i %0, %1, " #wo "; extui %0, %0, " #bo ", 8;" : "=r"(res) : "r"(o) : );\
  64. return res; }
  65. #else
  66. #define GET_BYTE_FN(name,t,wo,bo) \
  67. static inline lu_byte get ## name(const void *o) { return (cast(const t *,o))->name; }
  68. #endif
  69. /*
  70. ** Common type for all collectable objects
  71. */
  72. typedef struct GCObject GCObject;
  73. /*
  74. ** Common Header for all collectable objects (in macro form, to be
  75. ** included in other objects)
  76. */
  77. #define CommonHeader GCObject *next; lu_byte tt; lu_byte marked
  78. /*
  79. ** Common type has only the common header
  80. */
  81. struct GCObject {
  82. CommonHeader;
  83. };
  84. GET_BYTE_FN(tt,GCObject,4,0)
  85. GET_BYTE_FN(marked,GCObject,4,8)
  86. /*
  87. ** Tagged Values. This is the basic representation of values in Lua,
  88. ** an actual value plus a tag with its type.
  89. */
  90. /*
  91. ** Union of all Lua values
  92. */
  93. typedef union Value {
  94. GCObject *gc; /* collectable objects */
  95. void *p; /* light userdata */
  96. int b; /* booleans */
  97. lua_CFunction f; /* light C functions */
  98. lua_Integer i; /* integer numbers */
  99. lua_Number n; /* float numbers */
  100. } Value;
  101. #define TValuefields Value value_; int tt_
  102. #ifdef LUA_USE_ESP
  103. # pragma pack(4)
  104. #endif
  105. typedef struct lua_TValue {
  106. TValuefields;
  107. } TValue;
  108. #ifdef LUA_USE_ESP
  109. # pragma pack()
  110. #endif
  111. /* macro defining a nil value */
  112. #define NILCONSTANT {NULL}, LUA_TNIL
  113. #define val_(o) ((o)->value_)
  114. /* raw type tag of a TValue */
  115. #define rttype(o) ((o)->tt_)
  116. /* tag with no variants (bits 0-3) */
  117. #define novariant(x) ((x) & 0x0F)
  118. /* type tag of a TValue (bits 0-3 for tags + variant bits 4-5) */
  119. #define ttype(o) (rttype(o) & 0x3F)
  120. /* type tag of a TValue with no variants (bits 0-3) */
  121. #define ttnov(o) (novariant(rttype(o)))
  122. /* Macros to test type */
  123. #define checktag(o,t) (rttype(o) == (t))
  124. #define checktype(o,t) (ttnov(o) == (t))
  125. #define ttisnumber(o) checktype((o), LUA_TNUMBER)
  126. #define ttisfloat(o) checktag((o), LUA_TNUMFLT)
  127. #define ttisinteger(o) checktag((o), LUA_TNUMINT)
  128. #define ttisnil(o) checktag((o), LUA_TNIL)
  129. #define ttisboolean(o) checktag((o), LUA_TBOOLEAN)
  130. #define ttislightuserdata(o) checktag((o), LUA_TLIGHTUSERDATA)
  131. #define ttisstring(o) checktype((o), LUA_TSTRING)
  132. #define ttisshrstring(o) checktag((o), ctb(LUA_TSHRSTR))
  133. #define ttislngstring(o) checktag((o), ctb(LUA_TLNGSTR))
  134. #define ttistable(o) checktype((o), LUA_TTABLE)
  135. #define ttisrwtable(o) checktag((o), ctb(LUA_TTBLRAM))
  136. #define ttisrotable(o) checktag((o), ctb(LUA_TTBLROF))
  137. #define ttisfunction(o) checktype(o, LUA_TFUNCTION)
  138. #define ttisclosure(o) ((rttype(o) & 0x1F) == LUA_TFUNCTION)
  139. #define ttisCclosure(o) checktag((o), ctb(LUA_TCCL))
  140. #define ttisLclosure(o) checktag((o), ctb(LUA_TLCL))
  141. #define ttislcf(o) checktag((o), LUA_TLCF)
  142. #define ttisfulluserdata(o) checktag((o), ctb(LUA_TUSERDATA))
  143. #define ttisthread(o) checktag((o), ctb(LUA_TTHREAD))
  144. #define ttisdeadkey(o) checktag((o), LUA_TDEADKEY)
  145. /* Macros to access values */
  146. #define ivalue(o) check_exp(ttisinteger(o), val_(o).i)
  147. #define fltvalue(o) check_exp(ttisfloat(o), val_(o).n)
  148. #define nvalue(o) check_exp(ttisnumber(o), \
  149. (ttisinteger(o) ? cast_num(ivalue(o)) : fltvalue(o)))
  150. #define gcvalue(o) check_exp(iscollectable(o), val_(o).gc)
  151. #define pvalue(o) check_exp(ttislightuserdata(o), val_(o).p)
  152. #define tsvalue(o) check_exp(ttisstring(o), gco2ts(val_(o).gc))
  153. #define uvalue(o) check_exp(ttisfulluserdata(o), gco2u(val_(o).gc))
  154. #define clvalue(o) check_exp(ttisclosure(o), gco2cl(val_(o).gc))
  155. #define clLvalue(o) check_exp(ttisLclosure(o), gco2lcl(val_(o).gc))
  156. #define clCvalue(o) check_exp(ttisCclosure(o), gco2ccl(val_(o).gc))
  157. #define fvalue(o) check_exp(ttislcf(o), val_(o).f)
  158. #define hvalue(o) check_exp(ttistable(o), gco2t(val_(o).gc))
  159. #define rwhvalue(o) check_exp(ttisrwtable(o), gco2rot(val_(o).gc))
  160. #define rohvalue(o) check_exp(ttisrotable(o), gco2rwt(val_(o).gc))
  161. #define bvalue(o) check_exp(ttisboolean(o), val_(o).b)
  162. #define thvalue(o) check_exp(ttisthread(o), gco2th(val_(o).gc))
  163. /* a dead value may get the 'gc' field, but cannot access its contents */
  164. #define deadvalue(o) check_exp(ttisdeadkey(o), cast(void *, val_(o).gc))
  165. #define l_isfalse(o) (ttisnil(o) || (ttisboolean(o) && bvalue(o) == 0))
  166. #define iscollectable(o) (rttype(o) & BIT_ISCOLLECTABLE)
  167. /* Macros for internal tests */
  168. #define righttt(obj) (ttype(obj) == gettt(gcvalue(obj)))
  169. #define checkliveness(L,obj) \
  170. lua_longassert(!iscollectable(obj) || \
  171. (righttt(obj) && (L == NULL || !isdead(G(L),gcvalue(obj)))))
  172. /* Macros to set values */
  173. #define settt_(o,t) ((o)->tt_=(t))
  174. #define setfltvalue(obj,x) \
  175. { TValue *io=(obj); val_(io).n=(x); settt_(io, LUA_TNUMFLT); }
  176. #define chgfltvalue(obj,x) \
  177. { TValue *io=(obj); lua_assert(ttisfloat(io)); val_(io).n=(x); }
  178. #define setivalue(obj,x) \
  179. { TValue *io=(obj); val_(io).i=(x); settt_(io, LUA_TNUMINT); }
  180. #define chgivalue(obj,x) \
  181. { TValue *io=(obj); lua_assert(ttisinteger(io)); val_(io).i=(x); }
  182. #define setnilvalue(obj) settt_(obj, LUA_TNIL)
  183. #define setfvalue(obj,x) \
  184. { TValue *io=(obj); val_(io).f=(x); settt_(io, LUA_TLCF); }
  185. #define setpvalue(obj,x) \
  186. { TValue *io=(obj); val_(io).p=(x); settt_(io, LUA_TLIGHTUSERDATA); }
  187. #define setbvalue(obj,x) \
  188. { TValue *io=(obj); val_(io).b=(x); settt_(io, LUA_TBOOLEAN); }
  189. #define setgcovalue(L,obj,x) \
  190. { TValue *io = (obj); GCObject *i_g=(x); \
  191. val_(io).gc = i_g; settt_(io, ctb(i_g->tt)); }
  192. #define setsvalue(L,obj,x) \
  193. { TValue *io = (obj); TString *x_ = (x); \
  194. val_(io).gc = obj2gco(x_); settt_(io, ctb(gettt(x_))); \
  195. checkliveness(L,io); }
  196. #define setuvalue(L,obj,x) \
  197. { TValue *io = (obj); Udata *x_ = (x); \
  198. val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_TUSERDATA)); \
  199. checkliveness(L,io); }
  200. #define setthvalue(L,obj,x) \
  201. { TValue *io = (obj); lua_State *x_ = (x); \
  202. val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_TTHREAD)); \
  203. checkliveness(L,io); }
  204. #define setclLvalue(L,obj,x) \
  205. { TValue *io = (obj); LClosure *x_ = (x); \
  206. val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_TLCL)); \
  207. checkliveness(L,io); }
  208. #define setclCvalue(L,obj,x) \
  209. { TValue *io = (obj); CClosure *x_ = (x); \
  210. val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_TCCL)); \
  211. checkliveness(L,io); }
  212. #define sethvalue(L,obj,x) \
  213. { TValue *io = (obj); Table *x_ = (x); \
  214. val_(io).gc = obj2gco(x_); settt_(io, ctb(gettt(x_))); \
  215. checkliveness(L,io); }
  216. #define setdeadvalue(obj) settt_(obj, LUA_TDEADKEY)
  217. #define setobj(L,obj1,obj2) \
  218. { TValue *io1=(obj1); *io1 = *(obj2); \
  219. (void)L; checkliveness(L,io1); }
  220. /*
  221. ** different types of assignments, according to destination
  222. */
  223. /* from stack to (same) stack */
  224. #define setobjs2s setobj
  225. /* to stack (not from same stack) */
  226. #define setobj2s setobj
  227. #define setsvalue2s setsvalue
  228. #define sethvalue2s sethvalue
  229. #define setptvalue2s setptvalue
  230. /* from table to same table */
  231. #define setobjt2t setobj
  232. /* to new object */
  233. #define setobj2n setobj
  234. #define setsvalue2n setsvalue
  235. /* to table (define it as an expression to be used in macros) */
  236. #define setobj2t(L,o1,o2) ((void)L, *(o1)=*(o2), checkliveness(L,(o1)))
  237. /*
  238. ** {======================================================
  239. ** types and prototypes
  240. ** =======================================================
  241. */
  242. typedef TValue *StkId; /* index to stack elements */
  243. /*
  244. ** Header for string value; string bytes follow the end of this structure
  245. ** (aligned according to 'UTString'; see next).
  246. */
  247. typedef struct TString {
  248. CommonHeader;
  249. lu_byte extra; /* reserved words for short strings; "has hash" for longs */
  250. lu_byte shrlen; /* length for short strings */
  251. unsigned int hash;
  252. union {
  253. size_t lnglen; /* length for long strings */
  254. struct TString *hnext; /* linked list for hash table */
  255. } u;
  256. } TString;
  257. GET_BYTE_FN(extra,TString,4,16)
  258. GET_BYTE_FN(shrlen,TString,4,24)
  259. /*
  260. ** Ensures that address after this type is always fully aligned.
  261. */
  262. typedef union UTString {
  263. L_Umaxalign dummy; /* ensures maximum alignment for strings */
  264. TString tsv;
  265. } UTString;
  266. /*
  267. ** Get the actual string (array of bytes) from a 'TString'.
  268. ** (Access to 'extra' ensures that value is really a 'TString'.)
  269. */
  270. #define getstr(ts) \
  271. check_exp(sizeof((ts)->extra), cast(char *, (ts)) + sizeof(UTString))
  272. /* get the actual string (array of bytes) from a Lua value */
  273. #define svalue(o) getstr(tsvalue(o))
  274. /* get string length from 'TString *s' */
  275. #define tsslen(s) (gettt(s) == LUA_TSHRSTR ? getshrlen(s) : (s)->u.lnglen)
  276. /* get string length from 'TValue *o' */
  277. #define vslen(o) tsslen(tsvalue(o))
  278. /*
  279. ** Header for userdata; memory area follows the end of this structure
  280. ** (aligned according to 'UUdata'; see next).
  281. */
  282. typedef struct Udata {
  283. CommonHeader;
  284. lu_byte ttuv_; /* user value's tag */
  285. struct Table *metatable;
  286. size_t len; /* number of bytes */
  287. union Value user_; /* user value */
  288. } Udata;
  289. /*
  290. ** Ensures that address after this type is always fully aligned.
  291. */
  292. typedef union UUdata {
  293. L_Umaxalign dummy; /* ensures maximum alignment for 'local' udata */
  294. Udata uv;
  295. } UUdata;
  296. /*
  297. ** Get the address of memory block inside 'Udata'.
  298. ** (Access to 'ttuv_' ensures that value is really a 'Udata'.)
  299. */
  300. #define getudatamem(u) \
  301. check_exp(sizeof((u)->ttuv_), (cast(char*, (u)) + sizeof(UUdata)))
  302. #define setuservalue(L,u,o) \
  303. { const TValue *io=(o); Udata *iu = (u); \
  304. iu->user_ = io->value_; iu->ttuv_ = rttype(io); \
  305. checkliveness(L,io); }
  306. #define getuservalue(L,u,o) \
  307. { TValue *io=(o); const Udata *iu = (u); \
  308. io->value_ = iu->user_; settt_(io, iu->ttuv_); \
  309. checkliveness(L,io); }
  310. /*
  311. ** Description of an upvalue for function prototypes
  312. */
  313. typedef struct Upvaldesc {
  314. TString *name; /* upvalue name (for debug information) */
  315. lu_byte instack; /* whether it is in stack (register) */
  316. lu_byte idx; /* index of upvalue (in stack or in outer function's list) */
  317. } Upvaldesc;
  318. /*
  319. ** Description of a local variable for function prototypes
  320. ** (used for debug information)
  321. */
  322. typedef struct LocVar {
  323. TString *varname;
  324. int startpc; /* first point where variable is active */
  325. int endpc; /* first point where variable is dead */
  326. } LocVar;
  327. /*
  328. ** Function Prototypes
  329. */
  330. typedef struct Proto {
  331. CommonHeader;
  332. lu_byte numparams; /* number of fixed parameters */
  333. lu_byte is_vararg;
  334. lu_byte maxstacksize; /* number of registers needed by this function */
  335. int sizeupvalues; /* size of 'upvalues' */
  336. int sizek; /* size of 'k' */
  337. int sizecode;
  338. int sizelineinfo;
  339. int sizep; /* size of 'p' */
  340. int sizelocvars;
  341. int linedefined; /* debug information */
  342. int lastlinedefined; /* debug information */
  343. TValue *k; /* constants used by the function */
  344. Instruction *code; /* opcodes */
  345. struct Proto **p; /* functions defined inside the function */
  346. lu_byte *lineinfo; /* packedmap from opcodes to source lines (debug inf) */
  347. LocVar *locvars; /* information about local variables (debug information) */
  348. Upvaldesc *upvalues; /* upvalue information */
  349. TString *source; /* used for debug information */
  350. GCObject *gclist;
  351. } Proto;
  352. GET_BYTE_FN(numparams,Proto,4,16)
  353. GET_BYTE_FN(is_vararg,Proto,4,24)
  354. GET_BYTE_FN(maxstacksize,Proto,8,0)
  355. /*
  356. ** Lua Upvalues
  357. */
  358. typedef struct UpVal UpVal;
  359. /*
  360. ** Closures
  361. */
  362. #define ClosureHeader \
  363. CommonHeader; lu_byte nupvalues; GCObject *gclist
  364. typedef struct CClosure {
  365. ClosureHeader;
  366. lua_CFunction f;
  367. TValue upvalue[1]; /* list of upvalues */
  368. } CClosure;
  369. typedef struct LClosure {
  370. ClosureHeader;
  371. struct Proto *p;
  372. UpVal *upvals[1]; /* list of upvalues */
  373. } LClosure;
  374. typedef union Closure {
  375. CClosure c;
  376. LClosure l;
  377. } Closure;
  378. #define isLfunction(o) ttisLclosure(o)
  379. #define getproto(o) (clLvalue(o)->p)
  380. /*
  381. ** Common Table fields for both table versions (like CommonHeader in
  382. ** macro form, to be included in table structure definitions).
  383. **
  384. ** Note that the sethvalue() macro works much like the setsvalue()
  385. ** macro and handles the abstracted type. the hvalue(o) macro can be
  386. ** used to access CommonTable fields, but the rwhvalue(o) and
  387. ** rohvalue(o) value variants must be used if accessing variant-specfic
  388. ** fields
  389. */
  390. #define CommonTable CommonHeader; \
  391. lu_byte flags; lu_byte lsizenode; struct Table *metatable;
  392. /*
  393. ** Tables
  394. */
  395. typedef union TKey {
  396. struct {
  397. TValuefields;
  398. int next; /* for chaining (offset for next node) */
  399. } nk;
  400. TValue tvk;
  401. } TKey;
  402. /* copy a value into a key without messing up field 'next' */
  403. #define setnodekey(L,key,obj) \
  404. { TKey *k_=(key); const TValue *io_=(obj); \
  405. k_->nk.value_ = io_->value_; k_->nk.tt_ = io_->tt_; \
  406. (void)L; checkliveness(L,io_); }
  407. typedef struct Node {
  408. TValue i_val;
  409. TKey i_key;
  410. } Node;
  411. typedef struct Table {
  412. /* flags & 1<<p means tagmethod(p) is not present */
  413. /* lsizenode = log2 of size of 'node' array */
  414. CommonTable;
  415. unsigned int sizearray; /* size of 'array' array */
  416. TValue *array; /* array part */
  417. Node *node;
  418. Node *lastfree; /* any free position is before this position */
  419. GCObject *gclist;
  420. } Table;
  421. GET_BYTE_FN(flags,Table,4,16)
  422. GET_BYTE_FN(lsizenode,Table,4,24)
  423. typedef const struct ROTable_entry {
  424. const char *key;
  425. const TValue value;
  426. } ROTable_entry;
  427. typedef struct ROTable {
  428. /* next always has the value (GCObject *)((size_t) 1); */
  429. /* flags & 1<<p means tagmethod(p) is not present */
  430. /* lsizenode is the number of ROTable entries */
  431. /* Like TStrings, the ROTable_entry vector follows the ROTable */
  432. CommonTable;
  433. ROTable_entry *entry;
  434. } ROTable;
  435. /*
  436. ** 'module' operation for hashing (size is always a power of 2)
  437. */
  438. #define lmod(s,size) \
  439. (check_exp((size&(size-1))==0, (cast(int, (s) & ((size)-1)))))
  440. #define twoto(x) (1<<(x))
  441. #define sizenode(t) (twoto((t)->lsizenode))
  442. /*
  443. ** (address of) a fixed nil value
  444. */
  445. #define luaO_nilobject (&luaO_nilobject_)
  446. LUAI_DDEC const TValue luaO_nilobject_;
  447. /* size of buffer for 'luaO_utf8esc' function */
  448. #define UTF8BUFFSZ 8
  449. LUAI_FUNC int luaO_int2fb (unsigned int x);
  450. LUAI_FUNC int luaO_fb2int (int x);
  451. LUAI_FUNC int luaO_utf8esc (char *buff, unsigned long x);
  452. LUAI_FUNC int luaO_ceillog2 (unsigned int x);
  453. LUAI_FUNC void luaO_arith (lua_State *L, int op, const TValue *p1,
  454. const TValue *p2, TValue *res);
  455. LUAI_FUNC size_t luaO_str2num (const char *s, TValue *o);
  456. LUAI_FUNC int luaO_hexavalue (int c);
  457. LUAI_FUNC void luaO_tostring (lua_State *L, StkId obj);
  458. LUAI_FUNC const char *luaO_pushvfstring (lua_State *L, const char *fmt,
  459. va_list argp);
  460. LUAI_FUNC const char *luaO_pushfstring (lua_State *L, const char *fmt, ...);
  461. LUAI_FUNC void luaO_chunkid (char *out, const char *source, size_t len);
  462. #endif