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|http://jp.rubyist.net/magazine/?0013-CodeReview]]
http://arton.no-ip.info/data/cstruct/cstruct-0.1.0.ziphttp://arton.no-ip.info/data/cstruct/cstruct-0.1.1.zip
!abstract
* ANSI compatible member alignment.
* Win32 PCSTR and PWCSTR auto conversion.
!example
require 'cstruct'
class Foo
include C
HTTP_VERSION = Struct.define {
USHORT :MajorVersion;
USHORT :MinorVersion;
}
HTTP_KNOWN_HEADER = Struct.define {
USHORT :RawValueLength;
PCSTR :pRawValue;
}
...
end
inspired by [[aamine's dbf|http://jp.rubyist.net/magazine/?0013-CodeReview]]
!abstract
* ANSI compatible member alignment.
* Win32 PCSTR and PWCSTR auto conversion.
!example
require 'cstruct'
class Foo
include C
HTTP_VERSION = Struct.define {
USHORT :MajorVersion;
USHORT :MinorVersion;
}
HTTP_KNOWN_HEADER = Struct.define {
USHORT :RawValueLength;
PCSTR :pRawValue;
}
...
end