Skip to content

Commit

Permalink
Initialize GraphicsMagick on library load
Browse files Browse the repository at this point in the history
GNU Data Language library uses GraphicsMagick via static variables as well.
These get initialized and used on its library load and initialization. For
this reason GM library needs to be initialized on GDL library load.

Closes: #927307
  • Loading branch information
gcsideal authored and olebole committed May 1, 2019
1 parent c074e97 commit d4045d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/magick_cl.cpp
Expand Up @@ -66,6 +66,10 @@ namespace lib {
unsigned int gCount = 0;
static bool notInitialized = true;

__attribute__((constructor)) static void init(void) {
START_MAGICK;
}

void magick_setup() {
int i;
for (i = 0; i < 40; ++i) gValid[i] = 0;
Expand Down

0 comments on commit d4045d4

Please sign in to comment.