Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

SSL init.rs

  Interaktion und
PortierbarkeitRust
 

// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// This uses external interfaces to nss-rs rather than being a module
// inside of lib.rs. Because all other code uses the test_fixture module,
// they will be calling into the public version of init_db().  Calling into
// the version exposed to an inner module in lib.rs would result in calling
// a different version of init_db.  That causes explosions as they get
// different versions of the Once instance they use and they initialize NSS
// twice, probably likely in parallel.  That doesn't work out well.
use nss_rs::assert_initialized;
#[cfg(nss_nodb)]
use nss_rs::init;
#[cfg(not(nss_nodb))]
use nss_rs::init_db;

// Pull in the NSS internals so that we can ask NSS if it thinks that
// it is properly initialized.
#[expect(
    non_upper_case_globals,
    dead_code,
    reason = "Code is bindgen-generated."
)]
mod nss_init {
    use nss_rs::nss_prelude::*;
    include!(concat!(env!("OUT_DIR"), "/nss_init.rs"));
}

#[cfg(nss_nodb)]
#[test]
fn init_nodb() {
    nss_rs::init().unwrap();
    assert_initialized();
    unsafe {
        assert_ne!(nss_init::NSS_IsInitialized(), 0);
    }
}

#[cfg(not(nss_nodb))]
#[test]
fn init_withdb() {
    init_db(::test_fixture::db_path()).unwrap();
    assert_initialized();
    unsafe {
        assert_ne!(nss_init::NSS_IsInitialized(), 0);
    }
}

Messung V0.5 in Prozent
C=91 H=98 G=94

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.2Angebot  ¤

*Eine klare Vorstellung vom Zielzustand






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002