Skip to content

Incorrect casting from raw pointer #21

@khklau

Description

@khklau

Currently raw pointers to Apache2 objects are being cast to references by doing this:

&mut unsafe { *record_ptr }

This however is incorrect, as de-referencing the pointer actually creates a temporary object and a reference to the temporary is returned. The correct way to cast is like this:

unsafe {  record_ptr.as_mut().unwrap() }

This might be the cause of issue #19.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions