lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2013/3/2 Joshua Jensen <josh.jjensen@gmail.com>:
>> What are the power differences you found?
>
> I guess that at the time of the switch, I found myself changing lots of
> constructs in my format strings related to these:
>
> #define    OP_BSTRING    'p'        /* string preceded by length byte */
> #define    OP_WSTRING    'P'        /* string preceded by length word */
> #define    OP_SSTRING    'a'        /* string preceded by length size_t */

Hmm, I think these can be handled pretty easily (and more flexibly) in
Roberto's struct too, using the "c0" construct and a preceding length
specifier.

E.g.
   "string preceded by length byte" => "<I1c0" in struct
   "string preceded by length word"  =>  "<I2c0"
   etc

[Dunno, maybe this feature postdates your experience...]

-miles

--
Cat is power.  Cat is peace.