Skip to content

Commit

Permalink
Bump version, add a check and a control for visibility
Browse files Browse the repository at this point in the history
Add a check so cmsCreatedExtendedTransform behaves like other transform generators
Add a #define symbol to control visibility in linux. Useful if you want to create a so that contains lcms as static library.
Bump version number
  • Loading branch information
mm2 committed Mar 18, 2024
1 parent b2aeb18 commit 4635588
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions include/lcms2.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
//
//---------------------------------------------------------------------------------
//
// Version 2.16
// Version 2.17alpha0
//

#ifndef _lcms2_H
Expand Down Expand Up @@ -84,7 +84,7 @@ extern "C" {
#endif

// Version/release
#define LCMS_VERSION 2160
#define LCMS_VERSION 2170

// I will give the chance of redefining basic types for compilers that are not fully C99 compliant
#ifndef CMS_BASIC_TYPES_ALREADY_DEFINED
Expand Down Expand Up @@ -248,7 +248,7 @@ typedef int cmsBool;
# define CMSAPI
# endif
#else // not Windows
# ifdef HAVE_FUNC_ATTRIBUTE_VISIBILITY
# if defined(HAVE_FUNC_ATTRIBUTE_VISIBILITY) && !defined(CMS_NO_VISIBILITY)
# define CMSEXPORT
# define CMSAPI __attribute__((visibility("default")))
# else
Expand Down
10 changes: 9 additions & 1 deletion src/cmsxform.c
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,15 @@ cmsHTRANSFORM CMSEXPORT cmsCreateExtendedTransform(cmsContext ContextID,
cmsColorSpaceSignature EntryColorSpace;
cmsColorSpaceSignature ExitColorSpace;
cmsPipeline* Lut;
cmsUInt32Number LastIntent = Intents[nProfiles-1];
cmsUInt32Number LastIntent;

// Safeguard
if (nProfiles <= 0 || nProfiles > 255) {
cmsSignalError(ContextID, cmsERROR_RANGE, "Wrong number of profiles. 1..255 expected, %d found.", nProfiles);
return NULL;
}

LastIntent = Intents[nProfiles - 1];

// If it is a fake transform
if (dwFlags & cmsFLAGS_NULLTRANSFORM)
Expand Down

0 comments on commit 4635588

Please sign in to comment.