MCPcopy Create free account
hub / github.com/davidblewett/rure-python / push_inst_ptr

Function push_inst_ptr

regex/src/dfa.rs:285–289  ·  view source on GitHub ↗

Adds ip to data using delta encoding with respect to prev. After completion, `data` will contain `ip` and `prev` will be set to `ip`.

(data: &mut Vec<u8>, prev: &mut InstPtr, ip: InstPtr)

Source from the content-addressed store, hash-verified

283///
284/// After completion, `data` will contain `ip` and `prev` will be set to `ip`.
285fn push_inst_ptr(data: &mut Vec<u8>, prev: &mut InstPtr, ip: InstPtr) {
286 let delta = (ip as i32) - (*prev as i32);
287 write_vari32(data, delta);
288 *prev = ip;
289}
290
291struct InstPtrs<'a> {
292 base: usize,

Callers 2

cached_state_keyMethod · 0.85
pFunction · 0.85

Calls 1

write_vari32Function · 0.85

Tested by

no test coverage detected