Re: Structures

new topic     » topic index » view thread      » older message » newer message

Everett Williams wrote:

> I might not even want to use all of win32lib
> while desperately needing some of it's
> constituents.

The structure code used to be stand alone, but then I bundled all of
Win32Lib together, so it would be easier to include. I think I *might* have
released it at one point as a stand-alone module. It's a seperate file in
the Llama code, for example.

All this talk about structures is making me itchy to get the .H to .E
conversion program working. The structure toolkit is an integral part of it,
since that's the format that the C structures are converted into.

As I noted, the structure code is complete enough for what I do, but doesn't
conver every case. I ran into trouble the other day when I allocated a
string like so:

   szString = allocate( 32 )

This allocates a 'generic' chunk of 32 bytes, which fetch() returns as a
sequence. All fine and good, until I tried to do a comparison with another
string. printf() showed the strings were the same, and I didn't get a clue
until I traced the code and noticed the strings differed *after* the null
termination. Little things like that can be a real pain.

In terms of naming things, I'm holding off any decisions to change things
until Robert implements namespaces. It could have a little impact, or a lot,
but I'm not planning on second guessing him. After working with GTK, I
*almost* got into the habit of writing routine_names_like_this
insteadOfLikeThis, but not quite...

-- David Cuny

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu