Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:19
epgsql
0004-epgsql_binary-add-clause-with-list-argumen...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0004-epgsql_binary-add-clause-with-list-argument-to-encod.patch of Package epgsql
From c892efc701b7a0fbe70490cf42f0150be9879d2c Mon Sep 17 00:00:00 2001 From: Led <ledest@gmail.com> Date: Thu, 21 Apr 2016 15:43:47 +0300 Subject: [PATCH 4/4] epgsql_binary: add clause with list 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 a6d5a04..cdc783f 100644 --- a/src/epgsql_binary.erl +++ b/src/epgsql_binary.erl @@ -159,6 +159,7 @@ encode_hstore_string(Str) when is_float(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) when is_list(IP) -> encode_net(list_to_binary(IP)); 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