Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:20
epgsql
0003-epgsql_binary-add-clause-with-binary-argum...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0003-epgsql_binary-add-clause-with-binary-argument-to-enc.patch of Package epgsql
From 7c995a65e25ca6db5b2628cd8000868ab198db50 Mon Sep 17 00:00:00 2001 From: Led <ledest@gmail.com> Date: Mon, 11 Apr 2016 13:53:43 +0300 Subject: [PATCH 3/4] epgsql_binary: add clause with binary argument to encode_net/1 --- src/epgsql_binary.erl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/epgsql_binary.erl b/src/epgsql_binary.erl index 43e1a0d..a6d5a04 100644 --- a/src/epgsql_binary.erl +++ b/src/epgsql_binary.erl @@ -158,6 +158,7 @@ encode_hstore_string(Str) when is_float(Str) -> encode_hstore_string(iolist_to_binary(io_lib:format("~w", [Str]))); encode_hstore_string(Str) when is_binary(Str) -> <<(byte_size(Str)):?int32, Str/binary>>. +encode_net(IP) when is_binary(IP) -> <<(byte_size(IP)):?int32, IP/binary>>; encode_net({{_, _, _, _} = IP, Mask}) -> Bin = list_to_binary(tuple_to_list(IP)), <<?INET, Mask, 1, ?IP_SIZE, Bin/binary>>; -- 2.1.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor