----- Forwarded message from Lasse Collin <lasse.collin@tukaani> -----
Date: Sat, 13 Sep 2008 13:17:42 +0300
From: Lasse Collin <lasse.collin@tukaani>
To: Alexey Tourbin <at@altlinux>
Subject: Re: v4.999.5alpha LZMA_STREAM_INIT_VAR
Alexey Tourbin wrote:
> Upgrading to v4.999.5alpha breaks existing software builds, since
> LZMA_STREAM_INIT_VAR apparently has been removed from API (without
> deprecation note or something).
There are lots of other API changes in addition to LZMA_STREAM_INIT_VAR
in 4.999.5alpha, and I've already made a few more in the git
repository. So you need to be careful when upgrading until the first
stable release, because it is possible that some changes don't get
detected by the compiler, e.g. if a new member is added to a structure.
I know how much people hate API and ABI breakages. Once the first stable
release is out, I won't break the API or ABI easily. But before that, I
won't promise anything, because it would complicate development far too
much. Stable release should be out before end of this year.
> rpm5.org/rpmio/lzdio.c:
> 81 lzfile = calloc(1, sizeof(*lzfile));
> 82 if (!lzfile) {
> 83 (void) fclose(fp);
> 84 return NULL;
> 85 }
> 86 lzfile->fp = fp;
> 87 lzfile->encoding = encoding;
> 88 lzfile->eof = 0;
> 89 lzfile->strm = LZMA_STREAM_INIT_VAR;
You can use for example memset(&lzfile->strm, 0, sizeof(lzfile->strm)).
See the comment of LZMA_STREAM_INIT in src/liblzma/api/lzma/base.h for
details.
If you think the initialization should be done in some other way, for
example by having a separate function or macro to do the
initialization, let me know. I'm going to remove all exported variables
from the API, so LZMA_STREAM_INIT_VAR won't be added back as is.
--
Lasse Collin | IRC: Larhzu @ IRCnet & Freenode
----- End forwarded message -----
- application/pgp-signature attachment: stored
Received on Sun Sep 14 10:57:30 2008