rust/hg-cpython/src/lib.rs
changeset 41694 0c7b353ce100
parent 41240 ff333620a4cc
child 42179 13b64247f48f
equal deleted inserted replaced
41693:060c030c9993 41694:0c7b353ce100
    25 extern crate libc;
    25 extern crate libc;
    26 
    26 
    27 pub mod ancestors;
    27 pub mod ancestors;
    28 mod cindex;
    28 mod cindex;
    29 mod conversion;
    29 mod conversion;
       
    30 pub mod dagops;
    30 pub mod exceptions;
    31 pub mod exceptions;
    31 
    32 
    32 py_module_initializer!(rustext, initrustext, PyInit_rustext, |py, m| {
    33 py_module_initializer!(rustext, initrustext, PyInit_rustext, |py, m| {
    33     m.add(
    34     m.add(
    34         py,
    35         py,
    36         "Mercurial core concepts - Rust implementation",
    37         "Mercurial core concepts - Rust implementation",
    37     )?;
    38     )?;
    38 
    39 
    39     let dotted_name: String = m.get(py, "__name__")?.extract(py)?;
    40     let dotted_name: String = m.get(py, "__name__")?.extract(py)?;
    40     m.add(py, "ancestor", ancestors::init_module(py, &dotted_name)?)?;
    41     m.add(py, "ancestor", ancestors::init_module(py, &dotted_name)?)?;
       
    42     m.add(py, "dagop", dagops::init_module(py, &dotted_name)?)?;
    41     m.add(py, "GraphError", py.get_type::<exceptions::GraphError>())?;
    43     m.add(py, "GraphError", py.get_type::<exceptions::GraphError>())?;
    42     Ok(())
    44     Ok(())
    43 });
    45 });