[Ur] Code review request
Adam Chlipala
adamc at csail.mit.edu
Thu Apr 17 17:42:38 EDT 2014
On 04/17/2014 04:03 PM, Sergey Mironov wrote:
> Here is another small thing I've just remembered about: I saw uw_error
> calls in the body of uw_register_transactional(). Theoretically, this
> is not good since FFI programmers may use uw_register_transactional
> for registering various free/delete calls (I do). Raising an error
> from there would lead to memory leak in the FFI code this case.
> Probably, uw_register_transactional() should return an error code
> instead. This would give programmer a chance to free their resources
> and _than_ raise an error with uw_error.
An excellent point! I've corrected the problem.
uw_register_transactional() now returns int, with nonzero on error.
More information about the Ur
mailing list