Create  Edit  Diff  FrontPage  Index  Search  Changes  Login

The Backyard - cstruct Diff

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

cstruct is an utility that convert C struct for Ruby.

inspired by [[aamine's dbf|]]


* ANSI compatible member alignment.
* Win32 PCSTR and PWCSTR auto conversion.


require 'cstruct'

class Foo
   include C
   HTTP_VERSION = Struct.define {
     USHORT :MajorVersion;
     USHORT :MinorVersion;
   HTTP_KNOWN_HEADER = Struct.define {
     USHORT :RawValueLength;
     PCSTR :pRawValue;