FreeBSD Bugzilla – Attachment 216736 Details for
Bug 248236
graphics/gegl: g_random_* function always returns same random number sequence
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to fix graphics/gegl
patch-gegl-0.4.24_2.diff (text/plain), 1.08 KB, created by
Tatsuki Makino
on 2020-07-24 05:30:12 UTC
(
hide
)
Description:
patch to fix graphics/gegl
Filename:
MIME Type:
Creator:
Tatsuki Makino
Created:
2020-07-24 05:30:12 UTC
Size:
1.08 KB
patch
obsolete
>Index: graphics/gegl/files/patch-operations_common_perlin_perlin.c >=================================================================== >--- graphics/gegl/files/patch-operations_common_perlin_perlin.c (nonexistent) >+++ graphics/gegl/files/patch-operations_common_perlin_perlin.c (working copy) >@@ -0,0 +1,28 @@ >+--- operations/common/perlin/perlin.c.orig 2020-06-07 19:11:34 UTC >++++ operations/common/perlin/perlin.c >+@@ -7,7 +7,7 @@ >+ #include "perlin.h" >+ >+ /* random is not portable to all platforms */ >+-#define random g_random_int >++#define random() g_rand_int (gr) >+ >+ static int p[B + B + 2]; >+ static double g3[B + B + 2][3]; >+@@ -151,7 +151,7 @@ perlin_init (void) >+ return; >+ /* this is racy - but we call it once when creating our perlin noise op */ >+ >+- g_random_set_seed (1234567890); >++ GRand *gr = g_rand_new_with_seed (1234567890); >+ >+ for (i = 0; i < B; i++) >+ { >+@@ -184,6 +184,7 @@ perlin_init (void) >+ g3[B + i][j] = g3[i][j]; >+ } >+ initialized = 1; >++ g_rand_free (gr); >+ } >+ >+ /* --- My harmonic summing functions - PDB --------------------------*/
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 248236
: 216736