Skip to content

Commit e750b15

Browse files
committed
Update version 1.0.0
1 parent 3bcde9e commit e750b15

File tree

2 files changed

+6
-51
lines changed

2 files changed

+6
-51
lines changed

hashids.c

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222
#include "config.h"
2323
#endif
2424

25-
#include "php.h"
26-
#include "php_ini.h"
27-
#include "ext/standard/info.h"
28-
#include "php_hashids.h"
25+
#include <php_hashids.h>
2926

3027
zend_class_entry *hashids_ce;
3128
hashids_t *hashids_entry;
@@ -397,25 +394,6 @@ PHP_MINFO_FUNCTION(hashids)
397394
DISPLAY_INI_ENTRIES();
398395
}
399396

400-
/*
401-
Copyright (C) 2014 Latchezar Tzvetkoff
402-
403-
Permission is hereby granted, free of charge,
404-
to any person obtaining a copy of this software and associated documentation files (the "Software"),
405-
to deal in the Software without restriction, including without limitation the rights to use, copy,
406-
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
407-
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
408-
409-
The above copyright notice and this permission notice shall be included in all copies or substantial
410-
portions of the Software. d
411-
412-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
413-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
414-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
415-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
416-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
417-
DEALINGS IN THE SOFTWARE.
418-
*/
419397
/* common init */
420398
hashids_t * hashids_init(const char *salt, size_t min_hash_length, const char *alphabet)
421399
{

php_hashids.h

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,15 @@
2121
#ifndef PHP_HASHIDS_H
2222
#define PHP_HASHIDS_H
2323

24+
#include <php.h>
25+
#include <php_ini.h>
26+
#include <ext/standard/info.h>
27+
2428
extern zend_module_entry hashids_module_entry;
2529
#define phpext_hashids_ptr &hashids_module_entry
2630

27-
#define PHP_HASHIDS_VERSION "1.0.0-rc"
31+
#define PHP_HASHIDS_VERSION "1.0.0"
2832

29-
/*
30-
Copyright (C) 2014 Latchezar Tzvetkoff
31-
32-
Permission is hereby granted, free of charge,
33-
to any person obtaining a copy of this software and associated documentation files (the "Software"),
34-
to deal in the Software without restriction, including without limitation the rights to use, copy,
35-
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
36-
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
37-
38-
The above copyright notice and this permission notice shall be included in all copies or substantial
39-
portions of the Software. d
40-
41-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
42-
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
44-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
45-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
46-
DEALINGS IN THE SOFTWARE.
47-
*/
4833
/* minimal alphabet length */
4934
#define HASHIDS_MIN_ALPHABET_LENGTH 16u
5035

@@ -119,14 +104,6 @@ size_t hashids_numbers_count(hashids_t *hashids, char *str);
119104
size_t hashids_decode(hashids_t *hashids, char *str, unsigned long long *numbers);
120105
size_t hashids_decode_hex(hashids_t *hashids, char *str, char *output);
121106

122-
#ifdef PHP_WIN32
123-
# define PHP_HASHIDS_API __declspec(dllexport)
124-
#elif defined(__GNUC__) && __GNUC__ >= 4
125-
# define PHP_HASHIDS_API __attribute__ ((visibility("default")))
126-
#else
127-
# define PHP_HASHIDS_API
128-
#endif
129-
130107
#ifdef ZTS
131108
#include "TSRM.h"
132109
#endif

0 commit comments

Comments
 (0)