api: make private functions static to prevent their usage outside library