-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add getWithPrefixLen method #89
Conversation
And remove uncrustify config.
4647b25
to
6fa5e55
Compare
This still needs to normalize the prefix lengths for IPv4 lookups in IPv6 databases.
6fa5e55
to
3b36e9c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
} | ||
$tempBit = 0xFF & $rawAddress[$i >> 3]; | ||
for ($i = 0; $i < $bitCount && $node < $nodeCount; ++$i) { | ||
$tempBit = 0xFF & $rawAddress[($i >> 3) + 1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why +1? Oh... the array is starting at 1 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, PHP...
ext/maxminddb.c
Outdated
THROW_EXCEPTION("InvalidArgumentException", | ||
"The value \"%s\" is not a valid IP address.", | ||
ip_address); | ||
return; | ||
} | ||
if (!addresses && !addresses->ai_addr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be ||?
README.md
Outdated
## Installation (RPM) | ||
|
||
RPMs are available in the [official Fedora repository](https://apps.fedoraproject.org/packages/php-maxminddb) | ||
and in [Remi's RPM repository](https://rpms.remirepo.net/rpmphp/zoom.php?rpm=python-maxminddb). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gah. I can't find a good link. I'll just leave it off.
Closes #60.