<commit_before>extern crate libc;
use self::libc::c_int;

static mut callback:Option<extern fn(c_int)> = None;

#[no_mangle]
pub fn rs_trigger(val:c_int) {
  println!("Trigger called");
  if val == 1 {
    println!("Invoking callback");
    unsafe {
      match callback {
        Some(ref cb) => {
          (*cb)(100);
        },
        _ => {
          println!("No callback bound");
        }
      }
    }
  }
  else {
    println!("Nope");
  }
}

#[no_mangle]
pub fn rs_register(cb: extern fn(c_int)) {
  println!("Register called");
  unsafe {
    callback = Some(cb);
  }
}<commit_msg>match c code for compatibility testing<commit_after>extern crate libc;
use self::libc::c_int;

static mut callback:Option<extern fn(c_int)> = None;

#[no_mangle]
pub fn rs_trigger(val:c_int) -> c_int {
  println!("Trigger called");
  if val == 1 {
    println!("Invoking callback");
    unsafe {
      match callback {
        Some(ref cb) => {
          (*cb)(100);
        },
        _ => {
          println!("No callback bound");
        }
      }
    }
  }
  else {
    println!("Nope");
  }
  return val + 100;
}

#[no_mangle]
pub fn rs_register(cb: extern fn(c_int)) {
  println!("Register called");
  unsafe {
    callback = Some(cb);
  }
}
{'fraction_non_alphanumeric': 0.15942028985507245, 'fraction_numerical': 0.008856682769726247, 'mean_word_length': 2.5212464589235126, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5642471', 'n_tokens_mistral': 448, 'n_tokens_neox': 433, 'n_words': 95}