{"action":"created","comment":{"url":"https://api.github.com/repos/sfackler/rust-openssl/pulls/comments/59627662","id":59627662,"diff_hunk":"@@ -0,0 +1,96 @@\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//     http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+//\n+\n+use ffi;\n+use libc::c_int;\n+use std::ffi::CStr;\n+\n+/// OPENSSL_VERSION_NUMBER is a numeric release version identifier:\n+///\n+/// `MNNFFPPS: major minor fix patch status`\n+///\n+/// The status nibble has one of the values 0 for development, 1 to e for betas 1 to 14, and f for release.\n+///\n+/// for example\n+///\n+/// `0x000906000 == 0.9.6 dev`\n+/// `0x000906023 == 0.9.6b beta 3`\n+/// `0x00090605f == 0.9.6e release`\n+///\n+/// Versions prior to 0.9.3 have identifiers < 0x0930. Versions between 0.9.3 and 0.9.5 had a version identifier with this interpretation:\n+///\n+/// `MMNNFFRBB major minor fix final beta/patch`\n+///\n+/// for example\n+///\n+/// `0x000904100 == 0.9.4 release`\n+/// `0x000905000 == 0.9.5 dev`\n+///\n+/// Version 0.9.5a had an interim interpretation that is like the current one, except the patch level got the highest bit set, to keep continuity. The number was therefore 0x0090581f\n+///\n+/// The return value of this function can be compared to the macro to make sure that the correct version of the library has been loaded, especially when using DLLs on Windows systems.\n+pub fn number() -> i64 {\n+    unsafe { ffi::SSLeay() as i64 }\n+}\n+\n+const SSLEAY_VERSION : c_int = 0;","path":"openssl/src/version.rs","position":47,"original_position":47,"commit_id":"ded3e4a7f6bfa74f8055725517f9d1605d690136","original_commit_id":"ded3e4a7f6bfa74f8055725517f9d1605d690136","user":{"login":"sfackler","id":1455697,"avatar_url":"https://avatars.githubusercontent.com/u/1455697?v=3","gravatar_id":"","url":"https://api.github.com/users/sfackler","html_url":"https://github.com/sfackler","followers_url":"https://api.github.com/users/sfackler/followers","following_url":"https://api.github.com/users/sfackler/following{/other_user}","gists_url":"https://api.github.com/users/sfackler/gists{/gist_id}","starred_url":"https://api.github.com/users/sfackler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfackler/subscriptions","organizations_url":"https://api.github.com/users/sfackler/orgs","repos_url":"https://api.github.com/users/sfackler/repos","events_url":"https://api.github.com/users/sfackler/events{/privacy}","received_events_url":"https://api.github.com/users/sfackler/received_events","type":"User","site_admin":false},"body":"These constants should go in openssl-sys as well.","created_at":"2016-04-13T21:19:31Z","updated_at":"2016-04-13T21:19:31Z","html_url":"https://github.com/sfackler/rust-openssl/pull/380#discussion_r59627662","pull_request_url":"https://api.github.com/repos/sfackler/rust-openssl/pulls/380","_links":{"self":{"href":"https://api.github.com/repos/sfackler/rust-openssl/pulls/comments/59627662"},"html":{"href":"https://github.com/sfackler/rust-openssl/pull/380#discussion_r59627662"},"pull_request":{"href":"https://api.github.com/repos/sfackler/rust-openssl/pulls/380"}}},"pull_request":{"url":"https://api.github.com/repos/sfackler/rust-openssl/pulls/380","id":66381660,"html_url":"https://github.com/sfackler/rust-openssl/pull/380","diff_url":"https://github.com/sfackler/rust-openssl/pull/380.diff","patch_url":"https://github.com/sfackler/rust-openssl/pull/380.patch","issue_url":"https://api.github.com/repos/sfackler/rust-openssl/issues/380","number":380,"state":"open","locked":false,"title":"Resolves #378 - Module version with the version information","user":{"login":"Yoric","id":10190,"avatar_url":"https://avatars.githubusercontent.com/u/10190?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoric","html_url":"https://github.com/Yoric","followers_url":"https://api.github.com/users/Yoric/followers","following_url":"https://api.github.com/users/Yoric/following{/other_user}","gists_url":"https://api.github.com/users/Yoric/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoric/subscriptions","organizations_url":"https://api.github.com/users/Yoric/orgs","repos_url":"https://api.github.com/users/Yoric/repos","events_url":"https://api.github.com/users/Yoric/events{/privacy}","received_events_url":"https://api.github.com/users/Yoric/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-13T19:58:02Z","updated_at":"2016-04-13T21:19:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"366297c44cf27af620114c8b7b6a85ca5750bac5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sfackler/rust-openssl/pulls/380/commits","review_comments_url":"https://api.github.com/repos/sfackler/rust-openssl/pulls/380/comments","review_comment_url":"https://api.github.com/repos/sfackler/rust-openssl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sfackler/rust-openssl/issues/380/comments","statuses_url":"https://api.github.com/repos/sfackler/rust-openssl/statuses/ded3e4a7f6bfa74f8055725517f9d1605d690136","head":{"label":"Yoric:master","ref":"master","sha":"ded3e4a7f6bfa74f8055725517f9d1605d690136","user":{"login":"Yoric","id":10190,"avatar_url":"https://avatars.githubusercontent.com/u/10190?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoric","html_url":"https://github.com/Yoric","followers_url":"https://api.github.com/users/Yoric/followers","following_url":"https://api.github.com/users/Yoric/following{/other_user}","gists_url":"https://api.github.com/users/Yoric/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoric/subscriptions","organizations_url":"https://api.github.com/users/Yoric/orgs","repos_url":"https://api.github.com/users/Yoric/repos","events_url":"https://api.github.com/users/Yoric/events{/privacy}","received_events_url":"https://api.github.com/users/Yoric/received_events","type":"User","site_admin":false},"repo":{"id":56179234,"name":"rust-openssl","full_name":"Yoric/rust-openssl","owner":{"login":"Yoric","id":10190,"avatar_url":"https://avatars.githubusercontent.com/u/10190?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoric","html_url":"https://github.com/Yoric","followers_url":"https://api.github.com/users/Yoric/followers","following_url":"https://api.github.com/users/Yoric/following{/other_user}","gists_url":"https://api.github.com/users/Yoric/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoric/subscriptions","organizations_url":"https://api.github.com/users/Yoric/orgs","repos_url":"https://api.github.com/users/Yoric/repos","events_url":"https://api.github.com/users/Yoric/events{/privacy}","received_events_url":"https://api.github.com/users/Yoric/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Yoric/rust-openssl","description":"OpenSSL bindings for Rust","fork":true,"url":"https://api.github.com/repos/Yoric/rust-openssl","forks_url":"https://api.github.com/repos/Yoric/rust-openssl/forks","keys_url":"https://api.github.com/repos/Yoric/rust-openssl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yoric/rust-openssl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yoric/rust-openssl/teams","hooks_url":"https://api.github.com/repos/Yoric/rust-openssl/hooks","issue_events_url":"https://api.github.com/repos/Yoric/rust-openssl/issues/events{/number}","events_url":"https://api.github.com/repos/Yoric/rust-openssl/events","assignees_url":"https://api.github.com/repos/Yoric/rust-openssl/assignees{/user}","branches_url":"https://api.github.com/repos/Yoric/rust-openssl/branches{/branch}","tags_url":"https://api.github.com/repos/Yoric/rust-openssl/tags","blobs_url":"https://api.github.com/repos/Yoric/rust-openssl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yoric/rust-openssl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yoric/rust-openssl/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yoric/rust-openssl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yoric/rust-openssl/statuses/{sha}","languages_url":"https://api.github.com/repos/Yoric/rust-openssl/languages","stargazers_url":"https://api.github.com/repos/Yoric/rust-openssl/stargazers","contributors_url":"https://api.github.com/repos/Yoric/rust-openssl/contributors","subscribers_url":"https://api.github.com/repos/Yoric/rust-openssl/subscribers","subscription_url":"https://api.github.com/repos/Yoric/rust-openssl/subscription","commits_url":"https://api.github.com/repos/Yoric/rust-openssl/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yoric/rust-openssl/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yoric/rust-openssl/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yoric/rust-openssl/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yoric/rust-openssl/contents/{+path}","compare_url":"https://api.github.com/repos/Yoric/rust-openssl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yoric/rust-openssl/merges","archive_url":"https://api.github.com/repos/Yoric/rust-openssl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yoric/rust-openssl/downloads","issues_url":"https://api.github.com/repos/Yoric/rust-openssl/issues{/number}","pulls_url":"https://api.github.com/repos/Yoric/rust-openssl/pulls{/number}","milestones_url":"https://api.github.com/repos/Yoric/rust-openssl/milestones{/number}","notifications_url":"https://api.github.com/repos/Yoric/rust-openssl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yoric/rust-openssl/labels{/name}","releases_url":"https://api.github.com/repos/Yoric/rust-openssl/releases{/id}","deployments_url":"https://api.github.com/repos/Yoric/rust-openssl/deployments","created_at":"2016-04-13T19:14:45Z","updated_at":"2016-04-13T19:14:46Z","pushed_at":"2016-04-13T20:58:34Z","git_url":"git://github.com/Yoric/rust-openssl.git","ssh_url":"git@github.com:Yoric/rust-openssl.git","clone_url":"https://github.com/Yoric/rust-openssl.git","svn_url":"https://github.com/Yoric/rust-openssl","homepage":"","size":9199,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sfackler:master","ref":"master","sha":"9a482d9dd05978f60aa0a3460c74ecd68f537ac9","user":{"login":"sfackler","id":1455697,"avatar_url":"https://avatars.githubusercontent.com/u/1455697?v=3","gravatar_id":"","url":"https://api.github.com/users/sfackler","html_url":"https://github.com/sfackler","followers_url":"https://api.github.com/users/sfackler/followers","following_url":"https://api.github.com/users/sfackler/following{/other_user}","gists_url":"https://api.github.com/users/sfackler/gists{/gist_id}","starred_url":"https://api.github.com/users/sfackler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfackler/subscriptions","organizations_url":"https://api.github.com/users/sfackler/orgs","repos_url":"https://api.github.com/users/sfackler/repos","events_url":"https://api.github.com/users/sfackler/events{/privacy}","received_events_url":"https://api.github.com/users/sfackler/received_events","type":"User","site_admin":false},"repo":{"id":15500883,"name":"rust-openssl","full_name":"sfackler/rust-openssl","owner":{"login":"sfackler","id":1455697,"avatar_url":"https://avatars.githubusercontent.com/u/1455697?v=3","gravatar_id":"","url":"https://api.github.com/users/sfackler","html_url":"https://github.com/sfackler","followers_url":"https://api.github.com/users/sfackler/followers","following_url":"https://api.github.com/users/sfackler/following{/other_user}","gists_url":"https://api.github.com/users/sfackler/gists{/gist_id}","starred_url":"https://api.github.com/users/sfackler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfackler/subscriptions","organizations_url":"https://api.github.com/users/sfackler/orgs","repos_url":"https://api.github.com/users/sfackler/repos","events_url":"https://api.github.com/users/sfackler/events{/privacy}","received_events_url":"https://api.github.com/users/sfackler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sfackler/rust-openssl","description":"OpenSSL bindings for Rust","fork":false,"url":"https://api.github.com/repos/sfackler/rust-openssl","forks_url":"https://api.github.com/repos/sfackler/rust-openssl/forks","keys_url":"https://api.github.com/repos/sfackler/rust-openssl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sfackler/rust-openssl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sfackler/rust-openssl/teams","hooks_url":"https://api.github.com/repos/sfackler/rust-openssl/hooks","issue_events_url":"https://api.github.com/repos/sfackler/rust-openssl/issues/events{/number}","events_url":"https://api.github.com/repos/sfackler/rust-openssl/events","assignees_url":"https://api.github.com/repos/sfackler/rust-openssl/assignees{/user}","branches_url":"https://api.github.com/repos/sfackler/rust-openssl/branches{/branch}","tags_url":"https://api.github.com/repos/sfackler/rust-openssl/tags","blobs_url":"https://api.github.com/repos/sfackler/rust-openssl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sfackler/rust-openssl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sfackler/rust-openssl/git/refs{/sha}","trees_url":"https://api.github.com/repos/sfackler/rust-openssl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sfackler/rust-openssl/statuses/{sha}","languages_url":"https://api.github.com/repos/sfackler/rust-openssl/languages","stargazers_url":"https://api.github.com/repos/sfackler/rust-openssl/stargazers","contributors_url":"https://api.github.com/repos/sfackler/rust-openssl/contributors","subscribers_url":"https://api.github.com/repos/sfackler/rust-openssl/subscribers","subscription_url":"https://api.github.com/repos/sfackler/rust-openssl/subscription","commits_url":"https://api.github.com/repos/sfackler/rust-openssl/commits{/sha}","git_commits_url":"https://api.github.com/repos/sfackler/rust-openssl/git/commits{/sha}","comments_url":"https://api.github.com/repos/sfackler/rust-openssl/comments{/number}","issue_comment_url":"https://api.github.com/repos/sfackler/rust-openssl/issues/comments{/number}","contents_url":"https://api.github.com/repos/sfackler/rust-openssl/contents/{+path}","compare_url":"https://api.github.com/repos/sfackler/rust-openssl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sfackler/rust-openssl/merges","archive_url":"https://api.github.com/repos/sfackler/rust-openssl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sfackler/rust-openssl/downloads","issues_url":"https://api.github.com/repos/sfackler/rust-openssl/issues{/number}","pulls_url":"https://api.github.com/repos/sfackler/rust-openssl/pulls{/number}","milestones_url":"https://api.github.com/repos/sfackler/rust-openssl/milestones{/number}","notifications_url":"https://api.github.com/repos/sfackler/rust-openssl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sfackler/rust-openssl/labels{/name}","releases_url":"https://api.github.com/repos/sfackler/rust-openssl/releases{/id}","deployments_url":"https://api.github.com/repos/sfackler/rust-openssl/deployments","created_at":"2013-12-28T23:56:50Z","updated_at":"2016-04-08T01:36:42Z","pushed_at":"2016-04-13T20:58:35Z","git_url":"git://github.com/sfackler/rust-openssl.git","ssh_url":"git@github.com:sfackler/rust-openssl.git","clone_url":"https://github.com/sfackler/rust-openssl.git","svn_url":"https://github.com/sfackler/rust-openssl","homepage":"","size":9443,"stargazers_count":164,"watchers_count":164,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":128,"mirror_url":null,"open_issues_count":42,"forks":128,"open_issues":42,"watchers":164,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sfackler/rust-openssl/pulls/380"},"html":{"href":"https://github.com/sfackler/rust-openssl/pull/380"},"issue":{"href":"https://api.github.com/repos/sfackler/rust-openssl/issues/380"},"comments":{"href":"https://api.github.com/repos/sfackler/rust-openssl/issues/380/comments"},"review_comments":{"href":"https://api.github.com/repos/sfackler/rust-openssl/pulls/380/comments"},"review_comment":{"href":"https://api.github.com/repos/sfackler/rust-openssl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sfackler/rust-openssl/pulls/380/commits"},"statuses":{"href":"https://api.github.com/repos/sfackler/rust-openssl/statuses/ded3e4a7f6bfa74f8055725517f9d1605d690136"}}}}