forked from phper-framework/phper
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev>
- Loading branch information
1 parent
3877bab
commit dc1fd18
Showing
23 changed files
with
923 additions
and
712 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <phper.h> | ||
|
||
ZEND_FASTCALL void *phper_emalloc(size_t size) { | ||
return emalloc(size); | ||
} | ||
|
||
ZEND_FASTCALL void phper_efree(void *ptr) { | ||
efree(ptr); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
#include <phper.h> | ||
|
||
ZEND_FASTCALL zval *phper_zend_hash_str_update(HashTable *ht, const char *key, | ||
size_t len, zval *pData) { | ||
return zend_hash_str_update(ht, key, len, pData); | ||
} | ||
|
||
ZEND_FASTCALL zval *phper_zend_hash_index_update(HashTable *ht, zend_ulong h, | ||
zval *pData) { | ||
return zend_hash_index_update(ht, h, pData); | ||
} | ||
|
||
ZEND_FASTCALL zval *phper_zend_hash_next_index_insert(HashTable *ht, | ||
zval *pData) { | ||
return zend_hash_next_index_insert(ht, pData); | ||
} | ||
|
||
ZEND_FASTCALL void phper_array_init(zval *arg) { | ||
array_init(arg); | ||
} | ||
|
||
ZEND_FASTCALL void *phper_zend_hash_str_find_ptr(const HashTable *ht, | ||
const char *str, size_t len) { | ||
return zend_hash_str_find_ptr(ht, str, len); | ||
} | ||
|
||
ZEND_FASTCALL bool phper_zend_hash_str_exists(const HashTable *ht, | ||
const char *str, size_t len) { | ||
return zend_hash_str_exists(ht, str, len) != 0; | ||
} | ||
|
||
ZEND_FASTCALL bool phper_zend_hash_index_exists(const HashTable *ht, | ||
zend_ulong h) { | ||
return zend_hash_index_exists(ht, h) != 0; | ||
} | ||
|
||
ZEND_FASTCALL zend_array *phper_zend_new_array(uint32_t size) { | ||
return zend_new_array(size); | ||
} | ||
|
||
ZEND_FASTCALL zend_array *phper_zend_array_dup(zend_array *source) { | ||
return zend_array_dup(source); | ||
} | ||
|
||
ZEND_FASTCALL zval *phper_zend_hash_index_find(const HashTable *ht, | ||
zend_ulong h) { | ||
return zend_hash_index_find(ht, h); | ||
} | ||
|
||
ZEND_FASTCALL bool phper_zend_hash_index_del(HashTable *ht, zend_ulong h) { | ||
return zend_hash_index_del(ht, h) == SUCCESS; | ||
} | ||
|
||
ZEND_FASTCALL zval *phper_zend_symtable_str_update(HashTable *ht, | ||
const char *str, size_t len, | ||
zval *pData) { | ||
return zend_symtable_str_update(ht, str, len, pData); | ||
} | ||
|
||
ZEND_FASTCALL bool phper_zend_symtable_str_del(HashTable *ht, const char *str, | ||
size_t len) { | ||
return zend_symtable_str_del(ht, str, len) == SUCCESS; | ||
} | ||
|
||
ZEND_FASTCALL zval *phper_zend_symtable_str_find(HashTable *ht, const char *str, | ||
size_t len) { | ||
return zend_symtable_str_find(ht, str, len); | ||
} | ||
|
||
ZEND_FASTCALL bool phper_zend_symtable_str_exists(HashTable *ht, | ||
const char *str, size_t len) { | ||
return zend_symtable_str_exists(ht, str, len) != 0; | ||
} | ||
|
||
ZEND_FASTCALL zval *phper_zend_str_update(HashTable *ht, const char *str, | ||
size_t len, zval *pData) { | ||
return zend_hash_str_update(ht, str, len, pData); | ||
} | ||
|
||
ZEND_FASTCALL bool phper_zend_str_del(HashTable *ht, const char *str, | ||
size_t len) { | ||
return zend_hash_str_del(ht, str, len) == SUCCESS; | ||
} | ||
|
||
ZEND_FASTCALL zval *phper_zend_str_find(HashTable *ht, const char *str, | ||
size_t len) { | ||
return zend_hash_str_find(ht, str, len); | ||
} | ||
|
||
ZEND_FASTCALL bool phper_zend_str_exists(HashTable *ht, const char *str, | ||
size_t len) { | ||
return zend_hash_str_exists(ht, str, len) != 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
#include <phper.h> | ||
#include <zend_smart_str.h> | ||
|
||
ZEND_FASTCALL void phper_smart_str_alloc(smart_str *str, size_t len, | ||
bool persistent) { | ||
smart_str_alloc(str, len, persistent); | ||
} | ||
|
||
ZEND_FASTCALL void phper_smart_str_extend_ex(smart_str *dest, size_t len, | ||
bool persistent) { | ||
smart_str_extend_ex(dest, len, persistent); | ||
} | ||
|
||
ZEND_FASTCALL void phper_smart_str_erealloc(smart_str *str, size_t len) { | ||
smart_str_erealloc(str, len); | ||
} | ||
|
||
ZEND_FASTCALL void phper_smart_str_realloc(smart_str *str, size_t len) { | ||
smart_str_realloc(str, len); | ||
} | ||
|
||
ZEND_FASTCALL void phper_smart_str_free_ex(smart_str *str, bool persistent) { | ||
smart_str_free_ex(str, persistent); | ||
} | ||
|
||
ZEND_FASTCALL void phper_smart_str_append_escaped(smart_str *str, const char *s, | ||
size_t l) { | ||
smart_str_append_escaped(str, s, l); | ||
} | ||
|
||
ZEND_FASTCALL void phper_smart_str_append_double(smart_str *str, double num, | ||
int precision, | ||
bool zero_fraction) { | ||
smart_str_append_double(str, num, precision, zero_fraction); | ||
} | ||
|
||
ZEND_FASTCALL void phper_smart_str_append_escaped_truncated( | ||
smart_str *str, const zend_string *value, size_t length) { | ||
smart_str_append_escaped_truncated(str, value, length); | ||
} | ||
|
||
ZEND_FASTCALL void phper_smart_str_append_scalar(smart_str *str, | ||
const zval *value, | ||
size_t truncate) { | ||
smart_str_append_scalar(str, value, truncate); | ||
} | ||
|
||
ZEND_FASTCALL void phper_smart_str_0(smart_str *str) { | ||
smart_str_0(str); | ||
} | ||
|
||
ZEND_FASTCALL size_t phper_smart_str_get_len(const smart_str *str) { | ||
return smart_str_get_len((smart_str *)str); | ||
} | ||
|
||
ZEND_FASTCALL zend_string *phper_smart_str_extract(smart_str *str) { | ||
return smart_str_extract(str); | ||
} | ||
|
||
ZEND_FASTCALL void phper_smart_str_appendc_ex(smart_str *dest, char ch, | ||
bool persistent) { | ||
smart_str_appendc_ex(dest, ch, persistent); | ||
} | ||
|
||
ZEND_FASTCALL void phper_smart_str_appendl_ex(smart_str *dest, const char *str, | ||
size_t len, bool persistent) { | ||
smart_str_appendl_ex(dest, str, len, persistent); | ||
} | ||
|
||
ZEND_FASTCALL void phper_smart_str_append_ex(smart_str *dest, | ||
const zend_string *src, | ||
bool persistent) { | ||
smart_str_append_ex(dest, src, persistent); | ||
} | ||
|
||
ZEND_FASTCALL void phper_smart_str_append_smart_str_ex(smart_str *dest, | ||
const smart_str *src, | ||
bool persistent) { | ||
smart_str_append_smart_str_ex(dest, src, persistent); | ||
} | ||
|
||
ZEND_FASTCALL void phper_smart_str_append_long_ex(smart_str *dest, | ||
zend_long num, | ||
bool persistent) { | ||
smart_str_append_long_ex(dest, num, persistent); | ||
} | ||
|
||
ZEND_FASTCALL void phper_smart_str_append_unsigned_ex(smart_str *dest, | ||
zend_ulong num, | ||
bool persistent) { | ||
smart_str_append_unsigned_ex(dest, num, persistent); | ||
} | ||
|
||
ZEND_FASTCALL void phper_smart_str_setl(smart_str *dest, const char *src, | ||
size_t len) { | ||
smart_str_setl(dest, src, len); | ||
} |
Oops, something went wrong.