diff --git a/hashids.c b/hashids.c index 3b41dca..1657669 100644 --- a/hashids.c +++ b/hashids.c @@ -22,10 +22,7 @@ #include "config.h" #endif -#include "php.h" -#include "php_ini.h" -#include "ext/standard/info.h" -#include "php_hashids.h" +#include zend_class_entry *hashids_ce; hashids_t *hashids_entry; @@ -397,25 +394,6 @@ PHP_MINFO_FUNCTION(hashids) DISPLAY_INI_ENTRIES(); } -/* -Copyright (C) 2014 Latchezar Tzvetkoff - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. d - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. -*/ /* common init */ hashids_t * hashids_init(const char *salt, size_t min_hash_length, const char *alphabet) { diff --git a/php_hashids.h b/php_hashids.h index a103f9d..bb29101 100644 --- a/php_hashids.h +++ b/php_hashids.h @@ -21,30 +21,15 @@ #ifndef PHP_HASHIDS_H #define PHP_HASHIDS_H +#include +#include +#include + extern zend_module_entry hashids_module_entry; #define phpext_hashids_ptr &hashids_module_entry -#define PHP_HASHIDS_VERSION "1.0.0-rc" +#define PHP_HASHIDS_VERSION "1.0.0" -/* -Copyright (C) 2014 Latchezar Tzvetkoff - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. d - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. -*/ /* minimal alphabet length */ #define HASHIDS_MIN_ALPHABET_LENGTH 16u @@ -119,14 +104,6 @@ size_t hashids_numbers_count(hashids_t *hashids, char *str); size_t hashids_decode(hashids_t *hashids, char *str, unsigned long long *numbers); size_t hashids_decode_hex(hashids_t *hashids, char *str, char *output); -#ifdef PHP_WIN32 -# define PHP_HASHIDS_API __declspec(dllexport) -#elif defined(__GNUC__) && __GNUC__ >= 4 -# define PHP_HASHIDS_API __attribute__ ((visibility("default"))) -#else -# define PHP_HASHIDS_API -#endif - #ifdef ZTS #include "TSRM.h" #endif