[librsvg] build.rs: Move the call to generate_srgb_tables() to the correct place



commit a5c8a9ca2d9fdb8ed65d770cab72d97a6d7c4ee8
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Feb 12 16:07:16 2019 -0600

    build.rs: Move the call to generate_srgb_tables() to the correct place
    
    It should be called from main(), not from the other codegen function.
    Also, rename it for consistency.

 rsvg_internals/build.rs | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/rsvg_internals/build.rs b/rsvg_internals/build.rs
index ca7e6f22..5f305505 100644
--- a/rsvg_internals/build.rs
+++ b/rsvg_internals/build.rs
@@ -7,6 +7,7 @@ use std::path::Path;
 
 fn main() {
     generate_phf_of_svg_attributes();
+    generate_srgb_tables();
 }
 
 /// Creates a perfect hash function (PHF) to map SVG attribute names to enum values.
@@ -195,8 +196,6 @@ fn generate_phf_of_svg_attributes() {
 
     map.build(&mut file).unwrap();
     writeln!(&mut file, ";").unwrap();
-
-    output_srgb_tables();
 }
 
 /// Converts an sRGB color value to a linear sRGB color value (undoes the gamma correction).
@@ -245,7 +244,7 @@ fn print_table<W: Write>(w: &mut W, name: &str, table: &[u8]) {
     writeln!(w, "];").unwrap();
 }
 
-fn output_srgb_tables() {
+fn generate_srgb_tables() {
     let linearize_table = compute_table(linearize);
     let unlinearize_table = compute_table(unlinearize);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]