X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=src%2Fphp_pq_misc.c;h=d36f905e8e625dd6c9a3d9a87e637687d34f2bbb;hp=9ca158e43bbf97041151a577dd56316352be046a;hb=7d954192543192f2ef9b0db27f22b7807de31749;hpb=9ba862160ca65ed9a1e5eada87dcceba7fbf08d7 diff --git a/src/php_pq_misc.c b/src/php_pq_misc.c index 9ca158e..d36f905 100644 --- a/src/php_pq_misc.c +++ b/src/php_pq_misc.c @@ -17,9 +17,6 @@ #include #include #include -#if defined(HAVE_JSON) && !defined(COMPILE_DL_JSON) -# include -#endif #include @@ -28,7 +25,7 @@ #include "php_pq.h" #include "php_pq_misc.h" -char *rtrim(char *e) +char *php_pq_rtrim(char *e) { size_t l = strlen(e); @@ -38,7 +35,7 @@ char *rtrim(char *e) return e; } -const char *strmode(long mode) +const char *php_pq_strmode(long mode) { switch (mode & (INV_READ|INV_WRITE)) { case INV_READ|INV_WRITE: @@ -52,7 +49,7 @@ const char *strmode(long mode) } } -int compare_index(const void *lptr, const void *rptr TSRMLS_DC) +int php_pq_compare_index(const void *lptr, const void *rptr TSRMLS_DC) { const Bucket *l = *(const Bucket **) lptr; const Bucket *r = *(const Bucket **) rptr; @@ -142,12 +139,14 @@ zend_class_entry *php_pqconv_class_entry; ZEND_BEGIN_ARG_INFO_EX(ai_pqconv_convert_types, 0, 0, 0) ZEND_END_ARG_INFO(); -ZEND_BEGIN_ARG_INFO_EX(ai_pqconv_convert_from_string, 0, 0, 1) +ZEND_BEGIN_ARG_INFO_EX(ai_pqconv_convert_from_string, 0, 0, 2) ZEND_ARG_INFO(0, data) + ZEND_ARG_INFO(0, type) ZEND_END_ARG_INFO(); -ZEND_BEGIN_ARG_INFO_EX(ai_pqconv_convert_to_string, 0, 0, 1) +ZEND_BEGIN_ARG_INFO_EX(ai_pqconv_convert_to_string, 0, 0, 2) ZEND_ARG_INFO(0, data) + ZEND_ARG_INFO(0, type) ZEND_END_ARG_INFO(); zend_function_entry php_pqconv_methods[] = { @@ -162,7 +161,7 @@ PHP_MINIT_FUNCTION(pq_misc) { zend_class_entry **json, ce = {0}; - INIT_NS_CLASS_ENTRY(ce, "pq", "ConverterInterface", php_pqconv_methods); + INIT_NS_CLASS_ENTRY(ce, "pq", "Converter", php_pqconv_methods); php_pqconv_class_entry = zend_register_internal_interface(&ce TSRMLS_CC); memset(&ce, 0, sizeof(ce));